-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 1004 Bytes
/
test.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
name: Run tests
on:
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 16, "20.10.0", "latest" ]
name: Run tests on Node ${{ matrix.node }}
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: .parcel-cache
key: ${{ runner.os }}-node${{ matrix.node }}-parcel
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npx parcel build --no-source-maps --no-autoinstall
env:
NODE_ENV: production
- run: npm test -- --ci --coverage --json --outputFile=test-results.json --testResultsProcessor="jest-junit"
- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: coverage/cobertura-coverage.xml
badge: true
format: 'markdown'
output: 'both'