-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 935 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
38
39
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Setup emscripten
uses: mymindstorm/setup-emsdk@v14
- name: Install dependencies and build project
run: npm ci
- name: Run test suite and get coverage
run: npm run coverage
- name: Publish results badge
uses: wjervis7/vitest-badge-action@v1.0.0
if: success()
with:
badge-text: Coverage
result-type: lines
gist-token: ${{ secrets.COVERAGE_GIST_TOKEN }}
gist-url: https://gist.github.com/Erick2280/ae03665a8f65725b43639dde75968a03
upload-badge: ${{ github.ref == 'refs/heads/main' }}