-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (34 loc) · 1.01 KB
/
run-tests.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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x, 16.x, 18.x, 20.x, 22.x ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.JS ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Print npm and Node.JS versions
run: node -v && npm -v
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run linter
run: npm run lint
- name: Run tests with coverage
uses: paambaati/codeclimate-action@v9
env:
CC_TEST_REPORTER_ID: 8c570151987d2d735f6aa1ea8d79629d30dfbcd18251218528454e93aebb0b2d
with:
coverageCommand: npm run coverage # Seems that when a test fails also the coverage fails, so we can do two steps with one.