mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 17:30:01 +02:00
refactor: use composite action for node/pnpm setup
This commit is contained in:
parent
ce72a77f02
commit
8e4107d7f4
2 changed files with 10 additions and 37 deletions
|
@ -21,6 +21,7 @@ runs:
|
||||||
${{ runner.os }}-turbo-
|
${{ runner.os }}-turbo-
|
||||||
|
|
||||||
- name: Restore node_modules cache
|
- name: Restore node_modules cache
|
||||||
|
id: node-modules-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
@ -40,3 +41,8 @@ runs:
|
||||||
with:
|
with:
|
||||||
version: 10.11.0
|
version: 10.11.0
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
41
.github/workflows/ci-pipeline.yml
vendored
41
.github/workflows/ci-pipeline.yml
vendored
|
@ -42,44 +42,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore Turborepo cache
|
- name: Setup Node.js and pnpm
|
||||||
id: turbo-cache
|
uses: ./.github/composite-actions/setup-node-pnpm
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: .turbo
|
turbo-cache-key: ${{ runner.os }}-turbo-${{ github.sha }}
|
||||||
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
node-modules-cache-key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-turbo-
|
|
||||||
lookup-only: true
|
|
||||||
|
|
||||||
- name: Restore node_modules cache
|
|
||||||
id: node-modules-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
node_modules
|
|
||||||
*/node_modules
|
|
||||||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-modules-
|
|
||||||
lookup-only: true
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
|
|
||||||
- name: Setup pnpm
|
|
||||||
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
with:
|
|
||||||
version: 10.11.0
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
name: ESLint
|
name: ESLint
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue