Skip to content

Commit e76011b

Browse files
authored
chore: adjust code-pushup-coverage target (#1098)
This PR includes: - refactor the task graph of the `code-pushup-coverage` target <img width="1289" height="327" alt="Screenshot 2025-09-02 at 14 16 35" src="https://github.com/user-attachments/assets/f50e1c4e-a7b0-4edd-a223-8941727b4fa3" /> > [!note] > This change is needed to be able to reuse the test work across critical checks and conformance. > The `dependsOn` setting also enables a graceful handling of cases where a projects has not all of the listed test targets.
1 parent 4367e53 commit e76011b

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

code-pushup.preset.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,10 @@ export const coverageCoreConfigNx = async (
193193
projectName?: string,
194194
): Promise<CoreConfig> => {
195195
const targetNames = ['unit-test', 'int-test'];
196-
const targetArgs = ['-t', ...targetNames];
197196
return {
198197
plugins: [
199198
await coveragePlugin({
200-
coverageToolCommand: {
201-
command: 'npx',
202-
args: projectName
203-
? ['nx', 'run-many', '-p', projectName, ...targetArgs]
204-
: ['nx', 'run-many', ...targetArgs],
205-
},
199+
// We do not need to run a coverageToolCommand. This is handled over the Nx task graph.
206200
reports: projectName
207201
? [
208202
{

project.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44
"targets": {
55
"code-pushup-js-packages": {},
66
"code-pushup-lighthouse": {},
7-
"code-pushup-coverage": {},
7+
"code-pushup-coverage": {
8+
"dependsOn": [
9+
{
10+
"target": "unit-test",
11+
"projects": "*"
12+
},
13+
{
14+
"target": "int-test",
15+
"projects": "*"
16+
}
17+
]
18+
},
819
"code-pushup-eslint": {},
920
"code-pushup-jsdocs": {},
1021
"code-pushup-typescript": {},

0 commit comments

Comments
 (0)