-
Notifications
You must be signed in to change notification settings - Fork 76
52 lines (41 loc) · 1019 Bytes
/
main.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: test
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: ${{ github.event_name != 'push' }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: "node_modules"
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Test
run: yarn test
- name: Coverage
run: yarn codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}