-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
71 lines (67 loc) · 1.65 KB
/
ci.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
- push
- pull_request
permissions: {}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch:
- x64
- x86
node:
- 10
- 12
- 14
- 16
- 18
- 20
- 22
os:
- macOS-latest
- ubuntu-latest
- windows-latest
exclude:
- arch: x86
os: macOS-latest
- arch: x86
os: ubuntu-latest
- arch: x86
node: 18
os: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch }}
cache: 'npm'
cache-dependency-path: ./package.json
- run: npm install
- run: npm run lint
if:
matrix.os == 'ubuntu-latest' && matrix.node == 20 && matrix.arch ==
'x64'
- run: npm test
- run: |
id=$(node -e "console.log(crypto.randomBytes(16).toString('hex'))")
echo "job_id=$id" >> $GITHUB_OUTPUT
id: get_job_id
shell: bash
- uses: coverallsapp/github-action@v2
with:
flag-name:
${{ steps.get_job_id.outputs.job_id }} (Node.js ${{ matrix.node }}
${{ matrix.arch }} on ${{ matrix.os }})
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true