update pipeline
This commit is contained in:
parent
7c3be2621c
commit
6d690c002c
1 changed files with 22 additions and 17 deletions
39
.github/workflows/node.yml
vendored
39
.github/workflows/node.yml
vendored
|
@ -27,33 +27,38 @@ jobs:
|
||||||
default:
|
default:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
node-version: ['*', 'lts/*']
|
node-version: ['lts/*', '*']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 4
|
fetch-depth: 10
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Cache pnpm modules
|
- name: Enable Corepack
|
||||||
uses: actions/cache@v2
|
run: corepack enable
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
- name: Get pnpm store directory
|
||||||
|
id: pnpm-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=pnpm_store_path::$(pnpm store path)"
|
||||||
|
|
||||||
|
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||||
|
name: Set up pnpm cache
|
||||||
with:
|
with:
|
||||||
version: 6
|
path: ${{ steps.pnpm-cache.outputs.pnpm_store_path }}
|
||||||
run_install: |
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
- recursive: true
|
restore-keys: |
|
||||||
- args: [--frozen-lockfile, --strict-peer-dependencies]
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pnpm install --frozen-lockfile --strict-peer-dependencies
|
||||||
|
pnpm install ${{ matrix.vite-version }}
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: pnpm run test --if-present
|
run: pnpm run test --if-present
|
||||||
|
|
Reference in a new issue