-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 901 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
name: ci-node.js
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
name: Build and Test
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [10.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies and run tests with coverage
run: pnpm run test:coverage
- uses: codecov/codecov-action@v3
name: Upload coverage reports to Codecov
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
files: ./cobertura-coverage.xml
fail_ci_if_error: true
verbose: true