Skip to content

Commit 40ad20b

Browse files
authored
Merge pull request #1 from Serverless-Devs/test-coverage
Test coverage
2 parents d2cdb51 + c3f9ec6 commit 40ad20b

27 files changed

+9747
-574
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: CI
22

33
on:
4+
# 仅在 push 时触发测试
45
push:
5-
pull_request:
6-
branches: [main, master]
76

87
jobs:
98
build:
@@ -44,6 +43,8 @@ jobs:
4443

4544
steps:
4645
- uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0 # 获取完整历史用于增量覆盖率检查
4748

4849
- name: Use Node.js 18.x
4950
uses: actions/setup-node@v4
@@ -55,8 +56,8 @@ jobs:
5556
rm -rf node_modules package-lock.json
5657
npm install
5758
58-
- name: Run tests with coverage (unit tests only)
59-
run: npm run test:coverage -- --testPathPattern="unittests"
59+
- name: Run tests with coverage and check threshold (unit tests only)
60+
run: make coverage
6061

6162
- name: Upload coverage to Codecov
6263
uses: codecov/codecov-action@v4

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)