-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.21 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
#
# ci.yml
#
# Run tests for all pushed commits and opened pull requests on Github.
#
name: CI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Clean global cache
run: npm cache clean --force
- name: Set up Node
uses: actions/checkout@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: CI build & test
run: |
npm run build --if-present
npm run coverage
env:
CI: true
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
with:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
flag-name: node-${{ matrix.node-version }}
parallel: true
coveralls-finish:
name: Coveralls Webhook
needs: build
if: needs.build.result == 'success'
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.2.3
with:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
parallel-finished: true