Skip to content

Commit 670bce7

Browse files
committed
chore(ci): add codecov config file and update workflows
1 parent b0f4549 commit 670bce7

4 files changed

Lines changed: 36 additions & 1 deletion

File tree

.github/workflows/code-coverage.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7+
types: [opened, synchronize, reopened, edited]
8+
branches: [main]
9+
workflow_dispatch:
710

811
jobs:
912
coverage:
1013
runs-on: ubuntu-latest
11-
1214
steps:
1315
- name: ⬇️ Checkout repository
1416
uses: actions/checkout@v4
1517

18+
- name: ⏭ Skip tests & coverage
19+
if: github.event_name == 'pull_request' && (contains(github.event.pull_request.title, 'WIP') || contains(github.event.pull_request.title, '!COV'))
20+
run: |
21+
echo "Skipping tests and coverage upload due to PR title containing 'WIP' or '!COV'."
22+
exit 0
23+
1624
- name: 🟢 Setup Node.js
1725
uses: actions/setup-node@v4
1826
with:

.github/workflows/node-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: ['**']
66
pull_request:
77
branches: ['**']
8+
workflow_dispatch:
89

910
jobs:
1011
build:

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
tags:
88
- 'v*.*.*'
9+
workflow_dispatch:
910

1011
jobs:
1112
build:

codecov.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 85%
6+
threshold: 5%
7+
patch:
8+
default:
9+
target: 85%
10+
threshold: 5%
11+
12+
comment:
13+
layout: "reach, diff, flags, files"
14+
behavior: default
15+
require_changes: false
16+
17+
flags:
18+
unit:
19+
paths:
20+
- "src/"
21+
carryforward: true
22+
23+
github_checks:
24+
annotations: true
25+

0 commit comments

Comments
 (0)