Skip to content

Commit

Permalink
use explicit save and restore actions
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Aug 22, 2023
1 parent e435b9a commit db389b8
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/ci-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -100,6 +85,9 @@ jobs:
node-version: 18.x
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Fetch base branch for `git diff`
run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}

Expand Down

0 comments on commit db389b8

Please sign in to comment.