generated from hywax/vite-vanilla-library-template
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.04 KB
/
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
name: Tests
on:
push:
paths-ignore:
- ".md"
branches:
- main
pull_request:
paths-ignore:
- "*.md"
branches:
- main
jobs:
main:
name: Build and run tests
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- run: pnpm build
- run: pnpm test:coverage
- name: Publish Results Badge
uses: wjervis7/[email protected]
if: success() || failure() # run whether steps succeed or not
with:
result-type: lines
upload-badge: false
badge-text: coverage
- name: Commit badge
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: update code coverage badge'
file_pattern: './badge.svg'