Make WordPress Core


Ignore:
Timestamp:
07/06/2021 07:12:23 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.

Merges [51355] to the 5.8 branch.

Fixes #53606

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/.github/workflows/test-coverage.yml

    r50595 r51357  
    4545  # - Install WordPress within the Docker container.
    4646  # - Run the PHPUnit tests as a single site.
     47  # - Ensures version-controlled files are not modified or deleted.
    4748  # - Upload the single site code coverage report to Codecov.io.
    4849  # - Run the PHPUnit tests as a multisite.
     50  # - Ensures version-controlled files are not modified or deleted.
    4951  # - Upload the multisite code coverage report to Codecov.io.
    5052  test-coverage-report:
     
    131133        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
    132134
     135      - name: Ensure version-controlled files are not modified during the tests
     136        run: git diff --exit-code
     137
    133138      - name: Upload single site report to Codecov
    134139        if: ${{ ! matrix.multisite }}
     
    142147        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
    143148
     149      - name: Ensure version-controlled files are not modified during the tests
     150        run: git diff --exit-code
     151
    144152      - name: Upload multisite report to Codecov
    145153        if: ${{ matrix.multisite }}
Note: See TracChangeset for help on using the changeset viewer.