-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.12 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Test coverage
run: pnpm test:cov
- name: Update coverage badges
uses: jaywcjlove/coverage-badges-cli@main
with:
source: ./coverage/coverage-summary.json
output: ./coverage/badges.svg
jsonPath: total.lines.pct
- name: Setup docs
run: |
mkdir gh
cp -r coverage gh/coverage
cp README.md gh/README.md
- name: Deploy coverage
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./gh