-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1018 Bytes
/
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
name: Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Run tests
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test:ci
- name: Get coverage output
id: coverage
run: echo "value=$(jq -r '.total.lines.pct|tostring + "%"' coverage/coverage-summary.json)" >> $GITHUB_OUTPUT
- name: Update coverage badge JSON gist
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ba8810278ef57a8ae9243e3edf9f43b8
filename: coverage-master.json
label: Coverage
message: ${{ steps.coverage.outputs.value }}
color: green
namedLogo: vitest
forceUpdate: true