mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49369 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
4
.github/workflows/javascript-tests.yml
vendored
4
.github/workflows/javascript-tests.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
# - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
|
||||
# - Sets up caching for NPM.
|
||||
# - Logs updated debug information.
|
||||
# _ Installs NPM dependencies.
|
||||
# _ Installs NPM dependencies using install-changed to hash the `package.json` file.
|
||||
# - Run the WordPress QUnit tests.
|
||||
# - todo: Configure Slack notifications for failing tests.
|
||||
test-js:
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
node --version
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
run: npx install-changed --install-command="npm ci"
|
||||
|
||||
- name: Run QUnit tests
|
||||
run: npm run grunt qunit:compiled
|
||||
|
||||
Reference in New Issue
Block a user