WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2021 07:46:34 PM (11 months ago)
Author:
desrosj
Message:

Build/Test Tools: Change the frequency of code coverage reporting.

Before the coverage reports were submitted to Codecov.io, HTML coverage reports were compressed into ZIP files and uploaded to the workflow run as an artifact. A weekly schedule was chosen to run this workflow because generating a coverage report is more time consuming, and the resulting reports are quite large (~150-200MB each).

This changes the schedule for the code coverage workflow from weekly to daily and eliminates the ZIP artifacts that were previously generated. This will ensure the code coverage data found at https://codecov.io/gh/WordPress/wordpress-develop is relatively accurate on any given day of the week without needlessly consuming artifact storage.

Props jorbin.
See #50401, #52141.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/test-coverage.yml

    r49903 r49931  
    22
    33on:
    4   # Once weekly On Sundays at 00:00 UTC.
     4  # Once daily at 00:00 UTC.
    55  schedule:
    6     - cron: '0 0 * * 0'
     6    - cron: '0 0 * * *'
    77
    88env:
     
    3535  # - Logs debug information about what's installed within the WordPress Docker containers.
    3636  # - Install WordPress within the Docker container.
    37   # - Run the PHPUnit tests.
    38   # - Creates a ZIP file of the code coverage report.
    39   # - Uploads ZIP file as an artifact.
     37  # - Run the PHPUnit tests as a single site.
     38  # - Upload the single site code coverage report to Codecov.io.
    4039  # - Run the PHPUnit tests as a multisite.
    41   # - Creates a ZIP file of the code coverage report.
    42   # - Uploads ZIP file as an artifact.
     40  # - Upload the multisite code coverage report to Codecov.io.
    4341  test-coverage-report:
    4442    name: Generate a code coverage report
     
    125123
    126124      - name: Run tests as a single site
    127         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-html wp-code-coverage-single-${{ github.sha }} --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
     125        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
    128126
    129       - name: Create ZIP artifact of single site results
    130         uses: thedoctor0/zip-release@0.4.1
    131         with:
    132           filename: wp-code-coverage-single-${{ github.sha }}.zip
    133           path: wp-code-coverage-single-${{ github.sha }}
    134 
    135       - name: Upload single site coverage report
    136         uses: actions/upload-artifact@v2
    137         with:
    138           name: wp-code-coverage-single-${{ github.sha }}
    139           path: wp-code-coverage-single-${{ github.sha }}.zip
    140           if-no-files-found: error
    141 
    142       - name: Upload single site report  to codecov
     127      - name: Upload single site report to Codecov
    143128        uses: codecov/codecov-action@v1
    144129        with:
     
    147132
    148133      - name: Run tests as a multisite install
    149         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-html wp-code-coverage-multisite-${{ github.sha }} --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
     134        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
    150135
    151       - name: Create ZIP artifact of multisite results
    152         uses: thedoctor0/zip-release@0.4.1
    153         with:
    154           filename: wp-code-coverage-multisite-${{ github.sha }}.zip
    155           path: wp-code-coverage-multisite-${{ github.sha }}
    156 
    157       - name: Upload multisite coverage report
    158         uses: actions/upload-artifact@v2
    159         with:
    160           name: wp-code-coverage-multisite-${{ github.sha }}
    161           path: wp-code-coverage-multisite-${{ github.sha }}.zip
    162           if-no-files-found: error
    163 
    164       - name: Upload multisite report to codecov
     136      - name: Upload multisite report to Codecov
    165137        uses: codecov/codecov-action@v1
    166138        with:
Note: See TracChangeset for help on using the changeset viewer.