Make WordPress Core


Ignore:
Timestamp:
07/06/2021 06:36:46 PM (4 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.

Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the grunt clean command which erroneously deletes script-loader-packages.php. This file is re-populated during the build, but deleting it during the clean is undesirable.

Fixes #53606

File:
1 edited

Legend:

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

    r51341 r51355  
    4444  # - Install WordPress within the Docker container.
    4545  # - Run the PHPUnit tests as a single site.
     46  # - Ensures version-controlled files are not modified or deleted.
    4647  # - Upload the single site code coverage report to Codecov.io.
    4748  # - Run the PHPUnit tests as a multisite.
     49  # - Ensures version-controlled files are not modified or deleted.
    4850  # - Upload the multisite code coverage report to Codecov.io.
    4951  test-coverage-report:
     
    122124        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
    123125
     126      - name: Ensure version-controlled files are not modified during the tests
     127        run: git diff --exit-code
     128
    124129      - name: Upload single site report to Codecov
    125130        if: ${{ ! matrix.multisite }}
     
    133138        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
    134139
     140      - name: Ensure version-controlled files are not modified during the tests
     141        run: git diff --exit-code
     142
    135143      - name: Upload multisite report to Codecov
    136144        if: ${{ matrix.multisite }}
Note: See TracChangeset for help on using the changeset viewer.