-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (36 loc) · 983 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
name: CI
on:
push:
workflow_dispatch:
jobs:
lint-test:
name: Lint & test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '20.x', '22.x']
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'package.json'
- name: Install npm dependencies
run: npm install
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test -- --ci --coverage --runInBand
- name: Upload test reports
uses: actions/upload-artifact@v3
with:
name: test-reports
path: test/reports
- name: Upload test coverage
uses: actions/upload-artifact@v3
with:
name: test-coverage
path: test/coverage