-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (42 loc) · 1.1 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: unit-tests
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18, 20, 21]
name: ${{ matrix.os }} Node ${{ matrix.node }} cache
env:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory
id: yarn-cache
run: |
echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/[email protected]
id: cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-
${{ runner.os }}-node-
- run: |
yarn install --frozen-lockfile
yarn run lint
yarn run test:types
yarn run test