-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #777 from carstingaxion/feature/increase-workflow-…
…speed Increase workflow speed
- Loading branch information
Showing
9 changed files
with
202 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,10 +50,11 @@ jobs: | |
# @source https://dev.to/suzukishunsuke/secure-github-actions-by-pullrequesttarget-641#checkout-merge-commits | ||
- uses: suzuki-shunsuke/[email protected] | ||
id: pr | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{steps.pr.outputs.merge_commit_sha}} | ||
ref: ${{ steps.pr.outputs.merge_commit_sha }} | ||
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} | ||
|
||
- name: Setup PHP | ||
|
@@ -70,10 +71,32 @@ jobs: | |
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: npm | ||
# Enable built-in functionality for caching and restoring dependencies, which is disabled by default. | ||
# The actions/setup-node uses actions/cache under the hood. | ||
# https://github.com/actions/setup-node#caching-global-packages-data | ||
cache: 'npm' | ||
|
||
# Restoring the short lived node_modules cache | ||
# to be used accross all workflows running on the last commit. | ||
# https://github.com/actions/cache/blob/main/caching-strategies.md#creating-a-short-lived-cache | ||
- uses: actions/cache/restore@v4 | ||
id: node_modules-cache | ||
with: | ||
path: | | ||
./node_modules | ||
key: ${{ runner.os }}-node_modules-${{ steps.pr.outputs.merge_commit_sha }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: NPM install | ||
if: steps.node_modules-cache.outputs.cache-hit != 'true' | ||
run: npm ci --legacy-peer-deps | ||
|
||
# Creating a short lived node_modules cache | ||
- uses: actions/cache/save@v4 | ||
if: steps.node_modules-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: | | ||
./node_modules | ||
key: ${{ steps.node_modules-cache.outputs.cache-primary-key }} | ||
|
||
- name: Build plugin | ||
# - [Incorrect version number used when creating zip archive · Issue #92 · wp-cli/dist-archive-command](https://github.com/wp-cli/dist-archive-command/issues/92) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.