-
Notifications
You must be signed in to change notification settings - Fork 281
57 lines (46 loc) · 1.28 KB
/
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
53
54
55
56
57
name: tests.yml
on:
workflow_dispatch:
push:
branches:
- main
- '4.12'
- '4.13'
pull_request:
branches:
- main
- '4.12'
- '4.13'
jobs:
ci:
name: "${{ github.workflow }} ${{ matrix.os }} (node ${{ matrix.node-version }})"
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- name: use node ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
- name: yarn cache dir
id: yarn-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: yarn
run: yarn --frozen-lockfile
- name: yarn build
run: yarn build
- name: yarn test:github
run: yarn test:github
- name: coveralls
if: matrix.node-version == '22.x'
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: .lcov.info