From 9d18725a735e428a59d86f85acf64f41b566aadb Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 19 Feb 2021 15:10:47 -0500 Subject: [PATCH 01/19] First attempt to use GitHub Actions. --- .github/workflows/tests.yml | 66 +++++++++++++++++++++++++++++++++++++ .travis.yml | 16 --------- 2 files changed, 66 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..c6e8095 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,66 @@ +name: JavaScript Tests + +on: + push: + pull_request: + +jobs: + # Tests the PHPUnit test runner. + # + # Performs the following steps: + # - Cancels all previous workflow runs for pull requests that have not completed. + # - Checks out the repository. + # - Installs PHP. + # - Installs NodeJS 14. + # - Sets up caching for NPM. + # - Prepares the environment for tests. + # - Runs the tests. + # - Reports the results. + # - Cleans up. + test-js: + name: QUnit Tests + runs-on: ubuntu-latest + + steps: + - name: Cancel previous runs of this workflow (pull requests only) + if: ${{ github.event_name == 'pull_request' }} + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + + - name: Install NodeJS + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Cache NodeJS modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- + + - name: Prepare step + run: php prepare.php + + - name: Run tests + run: php test.php + + - name: Report tests + run: php report.php + + - name: Cleanup + run: php cleanup.php diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c406a62..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php -node_js: - - node - -before_install: - - npm install -g npm@latest - -install: - - php prepare.php - -script: - - php test.php - -after_script: - - php report.php - - php cleanup.php From ec86ffa588f3b674445bfa20cc7ffe6361aaba4f Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 19 Feb 2021 15:13:03 -0500 Subject: [PATCH 02/19] Use correct names. Don't run on push for PRs. --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c6e8095..b38430b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,9 @@ -name: JavaScript Tests +name: Test on: push: + branches: + - master pull_request: jobs: @@ -17,8 +19,8 @@ jobs: # - Runs the tests. # - Reports the results. # - Cleans up. - test-js: - name: QUnit Tests + test: + name: Test the runner runs-on: ubuntu-latest steps: From 3358d55f3ce3f46214f16cf51df9ed317499a86a Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 19 May 2021 10:24:02 +0200 Subject: [PATCH 03/19] generate `.ssh` folder if not existent --- prepare.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prepare.php b/prepare.php index ff0f7e0..26b47cb 100644 --- a/prepare.php +++ b/prepare.php @@ -21,6 +21,9 @@ $WPT_SSH_PRIVATE_KEY_BASE64 = getenv( 'WPT_SSH_PRIVATE_KEY_BASE64' ); if ( ! empty( $WPT_SSH_PRIVATE_KEY_BASE64 ) ) { log_message( 'Securely extracting WPT_SSH_PRIVATE_KEY_BASE64 into ~/.ssh/id_rsa' ); + if ( ! is_dir( getenv( 'HOME' ) . '/.ssh' ) ) { + mkdir( getenv( 'HOME' ) . '/.ssh', 0777, true ); + } file_put_contents( getenv( 'HOME' ) . '/.ssh/id_rsa', base64_decode( $WPT_SSH_PRIVATE_KEY_BASE64 ) ); perform_operations( array( 'chmod 600 ~/.ssh/id_rsa', From d551caec2335facec330b1a35216b2fe538a563b Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 19 May 2021 10:27:23 +0200 Subject: [PATCH 04/19] re-add travis file the hoster should be able to choose between different ways to run the `phpunit-test-runner` --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c406a62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: php +node_js: + - node + +before_install: + - npm install -g npm@latest + +install: + - php prepare.php + +script: + - php test.php + +after_script: + - php report.php + - php cleanup.php From 66ced63872d521f5dbfb6b05bbf271b42bdb7532 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 19 May 2021 10:31:11 +0200 Subject: [PATCH 05/19] add scheduler example --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b38430b..a847e84 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,12 @@ on: push: branches: - master + # To run the action on a schedule, you can also add a scheduler + # + # "*"" is a special character in YAML so you have to quote this string + # + # schedule: + # - cron: '0 * * * *' pull_request: jobs: From cb4576c32b6a2ac8b432e56ac45ece1035b62bc4 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 19 May 2021 10:34:48 +0200 Subject: [PATCH 06/19] add env vars as example --- .github/workflows/tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a847e84..1be7a03 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,21 @@ jobs: name: Test the runner runs-on: ubuntu-latest + env: + # This is only a subset/example of env vars, see the `.env.default` file for the full list. + WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} + WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} + WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} + # db settings + WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} + WPT_DB_USER: ${{ secrets.WPT_DB_USER }} + WPT_DB_PASSWORD: ${{ secrets.WPT_DB_PASSWORD }} + WPT_DB_HOST: ${{ secrets.WPT_DB_HOST }} + # ssh settings + WPT_SSH_CONNECT: ${{ secrets.WPT_SSH_CONNECT }} + WPT_SSH_PRIVATE_KEY_BASE64: ${{ secrets.WPT_SSH_PRIVATE_KEY_BASE64 }} + steps: - name: Cancel previous runs of this workflow (pull requests only) if: ${{ github.event_name == 'pull_request' }} From c2fe22c3a42fe1a0b4526330fed5dc58a51d3027 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 19 May 2021 10:50:12 +0200 Subject: [PATCH 07/19] Add `continue-on-error: true` for phpunit Otherwise the reporting will be skipped if phpunit runs into errors. --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1be7a03..ca7ffc9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,6 +81,7 @@ jobs: - name: Run tests run: php test.php + continue-on-error: true - name: Report tests run: php report.php From 99720403856124cfce3bfd810f920580e3588abd Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 19 May 2021 10:53:53 +0200 Subject: [PATCH 08/19] Add some doc --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ca7ffc9..bc23381 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,6 +81,7 @@ jobs: - name: Run tests run: php test.php + # Prevent GitHub Action to discontinue if PHPUnit runs into errors continue-on-error: true - name: Report tests From 6080a4e2c3671f828bc6a70df87b62184c4be3c5 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 3 Aug 2021 15:35:41 +0200 Subject: [PATCH 09/19] change caching thanks @desrosj --- .github/workflows/tests.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bc23381..da7b7f6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,17 +64,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14 - - - name: Cache NodeJS modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- + cache: npm - name: Prepare step run: php prepare.php From 1631b974cb45f6ff17fe655fab871a85b5bb97b2 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 4 Aug 2021 10:19:15 +0200 Subject: [PATCH 10/19] Revert "change caching" This reverts commit 6080a4e2c3671f828bc6a70df87b62184c4be3c5. --- .github/workflows/tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da7b7f6..bc23381 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,7 +64,17 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14 - cache: npm + + - name: Cache NodeJS modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- - name: Prepare step run: php prepare.php From cdbe3f576b777e951f2257b99e45264918b59606 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 17 Aug 2021 10:21:53 -0400 Subject: [PATCH 11/19] Use GHA native `concurrency` to cancel duplicate workflow runs. --- .github/workflows/tests.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bc23381..5ef3199 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,13 @@ on: # - cron: '0 * * * *' pull_request: +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: # Tests the PHPUnit test runner. # @@ -45,12 +52,6 @@ jobs: WPT_SSH_PRIVATE_KEY_BASE64: ${{ secrets.WPT_SSH_PRIVATE_KEY_BASE64 }} steps: - - name: Cancel previous runs of this workflow (pull requests only) - if: ${{ github.event_name == 'pull_request' }} - uses: styfle/cancel-workflow-action@0.8.0 - with: - access_token: ${{ github.token }} - - name: Checkout repository uses: actions/checkout@v2 From aabc6d4ebd877d093de0c24120139acd1850906a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 17 Aug 2021 10:22:13 -0400 Subject: [PATCH 12/19] Use caching built into `actions/setup-node`. --- .github/workflows/tests.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5ef3199..c95e1f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,17 +65,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14 - - - name: Cache NodeJS modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- + cache: npm - name: Prepare step run: php prepare.php From a47082ba3e2d6a77dd97dba4f74e275e23adc601 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 17 Aug 2021 10:24:55 -0400 Subject: [PATCH 13/19] Use commit SHAs for third-party actions. This follows the GitHub Actions security best practices when using third-party actions. For more info, see https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions. --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c95e1f8..cce90d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,16 +53,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Set up PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@947009a71769c25ab5292f073f5343624b7c879d # v2.12.0 with: php-version: '7.4' coverage: none - name: Install NodeJS - uses: actions/setup-node@v2 + uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954 # v2.4.0 with: node-version: 14 cache: npm From dcc7b2b743a5b3224515775a820dd231f467dc04 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 18 Aug 2021 09:43:31 -0400 Subject: [PATCH 14/19] Improve documentation. --- .github/workflows/tests.yml | 12 ++++++------ README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cce90d2..44041cd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,9 +4,11 @@ on: push: branches: - master - # To run the action on a schedule, you can also add a scheduler + # Workflows can be run on a schedule using the 'schedule' event trigger. # - # "*"" is a special character in YAML so you have to quote this string + # The example below runs the workflow every hour at minute 0.check_run: + # + # For more details on how to use the schedule event, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule. # # schedule: # - cron: '0 * * * *' @@ -23,11 +25,9 @@ jobs: # Tests the PHPUnit test runner. # # Performs the following steps: - # - Cancels all previous workflow runs for pull requests that have not completed. # - Checks out the repository. # - Installs PHP. - # - Installs NodeJS 14. - # - Sets up caching for NPM. + # - Installs NodeJS 14 with caching configured. # - Prepares the environment for tests. # - Runs the tests. # - Reports the results. @@ -72,7 +72,7 @@ jobs: - name: Run tests run: php test.php - # Prevent GitHub Action to discontinue if PHPUnit runs into errors + # Prevent the workflow from stopping if there are test failures. continue-on-error: true - name: Report tests diff --git a/README.md b/README.md index 7f0559d..f6a3a55 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ At a high level, the test suite runner: The test suite runner can be used in one of two ways: -1. With Travis (or Circle or some other CI service) as the controller that connects to the remote test environment. +1. With GitHub Actions, (or Travis, Circle, or another CI service) as the controller that connects to the remote test environment. 2. With the runner cloned to and run directly within the test environment. The test runner is configured through environment variables, documented in [`.env.default`](.env.default). It shouldn't need any code modifications; in fact, please refrain from editing the scripts entirely, as it will make it easier to stay up to date. From eddcad50cab00aa03fbfaebefeb561b18b30005e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 18 Aug 2021 09:45:30 -0400 Subject: [PATCH 15/19] Change the `schedule` example to match the suggestions on https://make.wordpress.org/hosting/test-results-getting-started/. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44041cd..4636105 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,12 +6,12 @@ on: - master # Workflows can be run on a schedule using the 'schedule' event trigger. # - # The example below runs the workflow every hour at minute 0.check_run: + # The example below runs the workflow every three hours. # # For more details on how to use the schedule event, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule. # # schedule: - # - cron: '0 * * * *' + # - cron: '0 0/3 * * *' pull_request: # Cancels all previous workflow runs for pull requests that have not completed. From ec143fa5de5a6b7e25ab1a1564f093029eb07785 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 18 Aug 2021 09:47:59 -0400 Subject: [PATCH 16/19] More documentation improvements. --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4636105..e21d261 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,21 +33,21 @@ jobs: # - Reports the results. # - Cleans up. test: - name: Test the runner + name: Run Core PHPUnit tests runs-on: ubuntu-latest env: - # This is only a subset/example of env vars, see the `.env.default` file for the full list. + # This is only a subset/example of env vars available. See the `.env.default` file for a full list. WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }} WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }} - # db settings + # Database settings WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }} WPT_DB_USER: ${{ secrets.WPT_DB_USER }} WPT_DB_PASSWORD: ${{ secrets.WPT_DB_PASSWORD }} WPT_DB_HOST: ${{ secrets.WPT_DB_HOST }} - # ssh settings + # SSH settings for connecting to the test environment. WPT_SSH_CONNECT: ${{ secrets.WPT_SSH_CONNECT }} WPT_SSH_PRIVATE_KEY_BASE64: ${{ secrets.WPT_SSH_PRIVATE_KEY_BASE64 }} From 7c72203e457154074cf3d05eb131267ec27fb1bb Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 18 Aug 2021 10:43:21 -0400 Subject: [PATCH 17/19] Remove Remove `push` and `pull_request` events. --- .github/workflows/tests.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e21d261..adb8c93 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,18 +1,25 @@ -name: Test +name: WordPress PHPUnit tests on: - push: - branches: - - master - # Workflows can be run on a schedule using the 'schedule' event trigger. + # The workflow should be run on a schedule using the 'schedule' event trigger. # - # The example below runs the workflow every three hours. + # For more details on how to configure the schedule event, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule. # - # For more details on how to use the schedule event, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule. - # - # schedule: - # - cron: '0 0/3 * * *' - pull_request: + # Below are some options for different schedules. Running the tests every hour is recommended, + # but every 3-6 hours is also helpful. Times are in UTC. + schedule: + # By default, the workflow will run every hour. + - cron: '0 * * * *' + # Every 3 hours. + # - cron: '0 0/3 * * *' + # Every 6 hours. + # - cron: '0 0/6 * * *' + # Every 12 hours. + # - cron: '0 0/12 * * *' + # Once per day at 00:00. + # - cron: '0 0 * * *' + # Every 30 minutes. + # - cron: '0/30 * * * *' # Cancels all previous workflow runs for pull requests that have not completed. concurrency: @@ -67,15 +74,15 @@ jobs: node-version: 14 cache: npm - - name: Prepare step + - name: Prepare environment run: php prepare.php - - name: Run tests + - name: Run unit tests run: php test.php # Prevent the workflow from stopping if there are test failures. continue-on-error: true - - name: Report tests + - name: Report the results run: php report.php - name: Cleanup From 01652cbb089b8520146d8cd65743dfa561586e3a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 18 Aug 2021 12:28:29 -0400 Subject: [PATCH 18/19] Add a condition to disable the workflow. GHA will not be the preferred way to run the tests for everyone. This includes a condition to disable it by default. --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index adb8c93..3bef7c2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,6 +43,9 @@ jobs: name: Run Core PHPUnit tests runs-on: ubuntu-latest + # Remove this line if Github Actions is your preferred means of running the tests. + if: never() + env: # This is only a subset/example of env vars available. See the `.env.default` file for a full list. WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }} From bc5bd6d6c4219ca7619e2526d5656bb98aec0be8 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 13 Sep 2021 11:48:36 -0400 Subject: [PATCH 19/19] Remove `npm` caching from the example GHA workflow. This is difficult to set up because a `package-lock.json` file is required in order to create a cache key. In this context, the lock file should be the one from WordPress Core. But since WordPress is not checked out until the `prepare.php` step, caching cannot be configured before hand. --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3bef7c2..41e67b9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -75,7 +75,6 @@ jobs: uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954 # v2.4.0 with: node-version: 14 - cache: npm - name: Prepare environment run: php prepare.php