-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 938 Bytes
/
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
node-version: [14.18.0, 14.x, 16.x, 18.x]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Run tests
run: npm run test
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
directory: ./coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}