|
1 |
| -name: CI |
| 1 | +name: 'Run tests on NodeJS' |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
12 | 12 |
|
13 | 13 | jobs:
|
14 | 14 | default:
|
15 |
| - runs-on: ${{ matrix.os }} |
| 15 | + runs-on: ubuntu-latest |
16 | 16 | strategy:
|
| 17 | + fail-fast: false |
17 | 18 | matrix:
|
18 | 19 | node-version: ['lts/*', '*']
|
19 |
| - os: [ubuntu-latest] |
20 | 20 |
|
21 | 21 | steps:
|
22 |
| - - uses: actions/checkout@v3 |
23 |
| - with: |
24 |
| - fetch-depth: 1 |
25 |
| - |
26 |
| - - uses: actions/setup-node@v3 |
27 |
| - with: |
28 |
| - node-version: ${{ matrix.node-version }} |
29 |
| - |
30 |
| - |
31 |
| - name: Install pnpm |
32 |
| - id: pnpm-install |
33 |
| - with: |
34 |
| - version: 8 |
35 |
| - run_install: false |
36 |
| - |
37 |
| - - name: Get pnpm store directory |
38 |
| - id: pnpm-cache |
39 |
| - run: | |
40 |
| - echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" |
41 |
| -
|
42 |
| - - uses: actions/cache@v3 |
43 |
| - name: Setup pnpm cache |
44 |
| - with: |
45 |
| - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} |
46 |
| - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
47 |
| - restore-keys: | |
48 |
| - ${{ runner.os }}-pnpm-store- |
49 |
| -
|
50 |
| - - name: Install dependencies |
51 |
| - run: pnpm install --frozen-lockfile --strict-peer-dependencies |
52 |
| - |
53 |
| - - name: Lint Source |
54 |
| - run: pnpm run --if-present lint |
55 |
| - |
56 |
| - - name: Build Source |
57 |
| - run: pnpm run --if-present build |
58 |
| - |
59 |
| - - name: Run Tests |
60 |
| - run: pnpm run --if-present test |
| 22 | + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 23 | + with: |
| 24 | + fetch-depth: 10 |
| 25 | + |
| 26 | + - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 |
| 27 | + with: |
| 28 | + node-version: ${{ matrix.node-version }} |
| 29 | + |
| 30 | + - name: Enable Corepack |
| 31 | + run: corepack enable |
| 32 | + |
| 33 | + - name: Get pnpm store directory |
| 34 | + id: pnpm-cache |
| 35 | + run: | |
| 36 | + echo "::set-output name=pnpm_store_path::$(pnpm store path)" |
| 37 | +
|
| 38 | + - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 |
| 39 | + name: Setup pnpm cache |
| 40 | + with: |
| 41 | + path: ${{ steps.pnpm-cache.outputs.pnpm_store_path }} |
| 42 | + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 43 | + restore-keys: | |
| 44 | + ${{ runner.os }}-pnpm-store- |
| 45 | +
|
| 46 | + - name: Install dependencies |
| 47 | + run: | |
| 48 | + pnpm install --frozen-lockfile --strict-peer-dependencies |
| 49 | +
|
| 50 | + - name: Lint Source |
| 51 | + run: pnpm run --if-present lint |
| 52 | + |
| 53 | + - name: Build Source |
| 54 | + run: pnpm run --if-present build |
| 55 | + |
| 56 | + - name: Run Tests |
| 57 | + run: pnpm run --if-present test |
0 commit comments