8000 ci: improve codecov report (#19430) · webpack/webpack@4211c97 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4211c97

Browse files
ci: improve codecov report (#19430)
1 parent b1bc97a commit 4211c97

File tree

3 files changed

+52
-24
lines changed

3 files changed

+52
-24
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,19 @@ jobs:
4848
yarn upgrade typescript@5.0
4949
yarn --frozen-lockfile
5050
yarn type-validate
51-
basic:
51+
validate-legacy-node:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Use Node.js
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: 10.x
59+
cache: "yarn"
60+
# Remove `devDependencies` from `package.json` to avoid `yarn install` compatibility error
61+
- run: node -e "const content = require('./package.json');delete content.devDependencies;require('fs').writeFileSync('package.json', JSON.stringify(content, null, 2));"
62+
- run: yarn install --production --frozen-lockfile
63+
types:
5264
runs-on: ubuntu-latest
5365
steps:
5466
- uses: actions/checkout@v4
@@ -60,25 +72,27 @@ jobs:
6072
- run: yarn --frozen-lockfile
6173
- run: yarn link --frozen-lockfile || true
6274
- run: yarn link webpack --frozen-lockfile
63-
- run: yarn test:basic --ci
75+
- run: yarn cover:types
6476
- uses: codecov/codecov-action@v5
6577
with:
66-
flags: basic
67-
functionalities: gcov
78+
flags: types
79+
disable_search: true
80+
files: ./coverage/coverage-types.json
6881
env:
6982
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
70-
validate-legacy-node:
83+
basic:
7184
runs-on: ubuntu-latest
7285
steps:
7386
- uses: actions/checkout@v4
7487
- name: Use Node.js
7588
uses: actions/setup-node@v4
7689
with:
77-
node-version: 10.x
90+
node-version: lts/*
7891
cache: "yarn"
79-
# Remove `devDependencies` from `package.json` to avoid `yarn install` compatibility error
80-
- run: node -e "const content = require('./package.json');delete content.devDependencies;require('fs').writeFileSync('package.json', JSON.stringify(content, null, 2));"
81-
- run: yarn install --production --frozen-lockfile
92+
- run: yarn --frozen-lockfile
93+
- run: yarn link --frozen-lockfile || true
94+
- run: yarn link webpack --frozen-lockfile
95+
- run: yarn test:basic --ci
8296
unit:
8397
runs-on: ubuntu-latest
8498
steps:
@@ -100,7 +114,6 @@ jobs:
100114
- uses: codecov/codecov-action@v5
101115
with:
102116
flags: unit
103-
functionalities: gcov
104117
env:
105118
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
106119
integration:
@@ -191,6 +204,5 @@ jobs:
191204
- uses: codecov/codecov-action@v5
192205
with:
193206
flags: integration
194-
functionalities: gcov
195207
env:
196208
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,5 +676,5 @@ Before we started using OpenCollective, donations were made anonymously. Now tha
676676
[builds2-url]: https://dev.azure.com/webpack/webpack/_build/latest?definitionId=3&branchName=main
677677
[dependency-review-url]: https://github.com/webpack/webpack/actions/workflows/dependency-review.yml
678678
[dependency-review]: https://github.com/webpack/webpack/actions/workflows/dependency-review.yml/badge.svg
679-
[cover]: https://codecov.io/gh/webpack/webpack/branch/master/graph/badge.svg?token=mDP3mQJNnn
679+
[cover]: https://codecov.io/gh/webpack/webpack/branch/main/graph/badge.svg?token=mDP3mQJNnn
680680
[cover-url]: https://codecov.io/gh/webpack/webpack

codecov.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,47 @@ coverage:
77
status:
88
project:
99
default: off
10-
basic:
11-
flags: basic
10+
types:
11+
flags:
12+
- types
13+
target: auto
14+
unit:
15+
flags:
16+
- unit
1217
target: auto
1318
integration:
14-
flags: integration
19+
flags:
20+
- integration
1521
target: auto
1622
patch:
1723
default: off
18-
basic:
19-
flags: basic
24+
types:
25+
flags:
26+
- types
27+
target: 90%
28+
base: pr
29+
unit:
30+
flags:
31+
- unit
2032
target: 90%
2133
base: pr
2234
integration:
23-
flags: integration
35+
flags:
36+
- integration
2437
target: 90%
2538
base: pr
2639
changes:
2740
default: off
28-
basic:
29-
flags: basic
30-
target: 0%
41+
types:
42+
flags:
43+
- types
44+
unit:
45+
flags:
46+
- unit
3147
integration:
32-
flags: integration
33-
target: 0%
48+
flags:
49+
- integration
3450
comment: off
3551
flags:
36-
basic:
52+
types:
3753
joined: false

0 commit comments

Comments
 (0)
0