-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use explicit save and restore actions
- Loading branch information
Showing
3 changed files
with
58 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,9 @@ jobs: | |
run: pnpm build | ||
|
||
- name: Cache build artifacts | ||
uses: actions/[email protected] | ||
uses: actions/cache/save@v3.3.1 | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
path: ./packages/**/dist | ||
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint | ||
|
||
unit-test: | ||
|
@@ -55,16 +51,6 @@ jobs: | |
repository: n8n-io/n8n | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
|
@@ -73,6 +59,15 @@ jobs: | |
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ./packages/**/dist | ||
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
|
@@ -94,16 +89,6 @@ jobs: | |
repository: n8n-io/n8n | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
|
@@ -112,6 +97,15 @@ jobs: | |
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ./packages/**/dist | ||
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint | ||
|
||
- name: Lint | ||
env: | ||
CI_LINT_MASTER: true | ||
|
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 |
---|---|---|
|
@@ -27,13 +27,9 @@ jobs: | |
run: pnpm build | ||
|
||
- name: Cache build artifacts | ||
uses: actions/[email protected] | ||
uses: actions/cache/save@v3.3.1 | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
path: ./packages/**/dist | ||
key: ${{ github.sha }}-base:18-test-lint | ||
|
||
unit-test: | ||
|
@@ -46,16 +42,6 @@ jobs: | |
repository: n8n-io/n8n | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
key: ${{ github.sha }}-base:18-test-lint | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Use Node.js 18 | ||
|
@@ -64,6 +50,15 @@ jobs: | |
node-version: 18.x | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ./packages/**/dist | ||
key: ${{ github.sha }}-base:18-test-lint | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
|
@@ -82,16 +77,6 @@ jobs: | |
repository: n8n-io/n8n | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
key: ${{ github.sha }}-base:18-test-lint | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Use Node.js 18 | ||
|
@@ -100,6 +85,15 @@ jobs: | |
node-version: 18.x | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ./packages/**/dist | ||
key: ${{ github.sha }}-base:18-test-lint | ||
|
||
- name: Fetch base branch for `git diff` | ||
run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }} | ||
|
||
|
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 |
---|---|---|
|
@@ -87,20 +87,10 @@ jobs: | |
git fetch origin pull/${{ inputs.pr_number }}/head | ||
git checkout FETCH_HEAD | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
run_install: true | ||
- uses: pnpm/[email protected] | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
key: ${{ inputs.cache-key }} | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Cypress build | ||
uses: cypress-io/[email protected] | ||
|
@@ -113,6 +103,15 @@ jobs: | |
- name: Cypress install | ||
run: pnpm cypress:install | ||
|
||
- name: Cache build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./packages/**/dist | ||
key: ${{ inputs.cache-key }} | ||
|
||
testing: | ||
runs-on: ubuntu-latest | ||
container: | ||
|
@@ -137,19 +136,20 @@ jobs: | |
git fetch origin pull/${{ inputs.pr_number }}/head | ||
git checkout FETCH_HEAD | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
- uses: pnpm/[email protected] | ||
|
||
- name: Restore cached pnpm modules | ||
uses: actions/[email protected] | ||
uses: actions/cache/restore@v3.3.1 | ||
with: | ||
path: | | ||
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./node_modules | ||
./packages | ||
./packages/**/dist | ||
key: ${{ inputs.cache-key }} | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Cypress run | ||
uses: cypress-io/[email protected] | ||
with: | ||
|