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/coding-standards.yml

    r51341 r51355  
    5656  # - Runs PHPCS on the full codebase with warnings suppressed.
    5757  # - Runs PHPCS on the `tests` directory without warnings suppressed.
     58  # - Ensures version-controlled files are not modified or deleted.
    5859  # - todo: Configure Slack notifications for failing scans.
    5960  phpcs:
     
    9596        run: phpcs tests -q --report=checkstyle | cs2pr
    9697
     98      - name: Ensure version-controlled files are not modified during the tests
     99        run: git diff --exit-code
     100
    97101  # Runs the JavaScript coding standards checks.
    98102  #
     
    106110  # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
    107111  # - Run the WordPress JSHint checks.
     112  # - Ensures version-controlled files are not modified or deleted.
    108113  # - todo: Configure Slack notifications for failing tests.
    109114  jshint:
     
    141146      - name: Run JSHint
    142147        run: npm run grunt jshint
     148
     149      - name: Ensure version-controlled files are not modified or deleted
     150        run: git diff --exit-code
Note: See TracChangeset for help on using the changeset viewer.