-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
61 lines (59 loc) · 1.46 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
name: CI
on:
- push
- pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch:
- x64
- x86
node:
- 8
- 10
- 12
- 14
- 16
os:
- macOS-latest
- ubuntu-latest
- windows-latest
exclude:
- arch: x86
os: macOS-latest
- arch: x86
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch }}
- run: npm install
- run: npm run lint
if:
matrix.os == 'ubuntu-latest' && matrix.node == 16 && matrix.arch ==
'x64'
- run: npm test
- run:
echo ::set-output name=job_id::$(node -e
"console.log(crypto.randomBytes(16).toString('hex'))")
id: get_job_id
shell: bash
- uses: coverallsapp/[email protected]
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/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true