Skip to content

Commit c9a262c

Browse files
author
逍为
committed
test: add build and cov
1 parent 74e56b3 commit c9a262c

6 files changed

Lines changed: 66 additions & 139 deletions

File tree

.codecov.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Setting coverage targets per flag
2+
coverage:
3+
round: down
4+
range: 60..90
5+
precision: 2
6+
status:
7+
patch: off
8+
project:
9+
default: off
10+
ava:
11+
threshold: 1%
12+
flags:
13+
- ava
14+
15+
flags:
16+
ava:
17+
paths:
18+
# filter the folder(s) you wish to measure by that flag
19+
- src
20+
21+
comment:
22+
layout: "reach, diff, flags, files"
23+
behavior: default
24+
require_changes: true # only post the comment if coverage changes
25+
26+
github_checks:
27+
annotations: false
28+
29+
flag_management:
30+
default_rules:
31+
carryforward: false

.github/workflows/auto-release.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: build
2+
on:
3+
push:
4+
branches: [master, main, v4]
5+
pull_request:
6+
branches: [master, main, v4]
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: ⤵️ Checkout
13+
uses: actions/checkout@v5
14+
15+
- name: 🎉 Setup Node.js
16+
uses: actions/setup-node@v6
17+
with:
18+
node-version: 20
19+
20+
- name: 📦 Install dependencies
21+
run: npm install
22+
23+
- name: 🚀 Build
24+
run: npm run build
25+
26+
- name: ✅ Test
27+
run: npm run test
28+
29+
- name: 💡 Upload coverage to Codecov
30+
uses: codecov/codecov-action@v5
31+
with:
32+
files: ./coverage/coverage-final.json
33+
flags: ava
34+
env:
35+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/mirror.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/release-notify.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/sync-after-auto-release.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)