Make WordPress Core


Ignore:
Timestamp:
10/29/2020 01:20:42 AM (3 years ago)
Author:
desrosj
Message:

Build/Test Tools: Use install-changed to install NPM dependencies in GitHub Action workflows.

The install-changed package records a hash of the package.json file locally in a text file and only runs npm install when there are changes to account for.

This builds on [47497], which only hashes the package.json file after a Grunt task is called. By using npx install-changed within the workflow files, the package is hashed before the first Grunt task is run.

Props ocean90.
See #50401, #49594.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/coding-standards.yml

    r49227 r49369  
    8080  # - Sets up caching for NPM.
    8181  # - Logs updated debug information.
    82   # _ Installs NPM dependencies.
     82  # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
    8383  # - Run the WordPress JSHint checks.
    8484  # - todo: Configure Slack notifications for failing tests.
     
    121121
    122122      - name: Install Dependencies
    123         run: npm ci
     123        run: npx install-changed --install-command="npm ci"
    124124
    125125      - name: Run JSHint
Note: See TracChangeset for help on using the changeset viewer.