Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
709bb88
chore: add env var helper
Aug 12, 2025
0958ad0
chore: add default targets
Aug 12, 2025
30fa5b3
chore: adjust gh actions
Aug 12, 2025
622a5ac
chore: refine targets 4
Aug 13, 2025
503be8f
chore: refine targets 5
Aug 13, 2025
503b076
chore: refine targets 6
Aug 13, 2025
1d5bb72
chore: refine gh action
Aug 13, 2025
52612d7
fix: avoid graph generation if possible
Aug 13, 2025
a9c3afa
fix: imports
Aug 13, 2025
26068d4
Merge branch 'main' into add-plugin-targets
Aug 14, 2025
d9c0411
Merge branch 'main' into add-plugin-targets
Aug 14, 2025
0bcba8f
fix: revert code
BioPhoton Aug 16, 2025
53cb658
revert
BioPhoton Aug 16, 2025
f18e6e5
chore: adjust parallel in gh action
BioPhoton Aug 16, 2025
7d2fbb3
chore: adjust nx caching
BioPhoton Aug 16, 2025
18707a6
chore: adjust project graph creation
BioPhoton Aug 16, 2025
2637c38
chore: adjust project graph creation 2
BioPhoton Aug 16, 2025
da01d55
chore: adjust project graph creation 3
BioPhoton Aug 16, 2025
05891ea
chore: adjust project graph creation 4
BioPhoton Aug 16, 2025
32499ab
chore: adjust project graph creation 4
BioPhoton Aug 16, 2025
c9c2c5c
chore: adjust caching
BioPhoton Aug 16, 2025
5e2a859
fix: adjust path helper
BioPhoton Aug 16, 2025
3cc8269
fix: adjust default inputs
BioPhoton Aug 16, 2025
df60ab7
fix: lint issues
BioPhoton Aug 16, 2025
dd9e314
fix: update nx.json
BioPhoton Aug 16, 2025
b9b37bf
fix: update nx.json 2
BioPhoton Aug 16, 2025
0ab3b50
fix: use "*" matcher for dependsOn tasks
BioPhoton Aug 18, 2025
3cdb563
Update nx.json
BioPhoton Aug 19, 2025
787fbf0
fix: add fetch 0
BioPhoton Aug 19, 2025
51fc913
fix: rename root project
BioPhoton Aug 19, 2025
9794a7e
Merge branch 'main' into add-plugin-targets
BioPhoton Aug 19, 2025
458d500
chore: adjust caching settings
BioPhoton Aug 19, 2025
13d03b4
chore: fix caching settings
BioPhoton Aug 19, 2025
59f9ded
chore: reduce args
BioPhoton Aug 19, 2025
f7005d4
chore: rename GH actions
BioPhoton Aug 19, 2025
9192a60
chore: reduce target options
BioPhoton Aug 20, 2025
a051e40
chore: test bail
BioPhoton Aug 20, 2025
61b4d79
Update nx.json
BioPhoton Aug 20, 2025
84bb7e3
fix: fix format
BioPhoton Aug 20, 2025
d6cc8b3
fix: adjust format
BioPhoton Aug 20, 2025
8f6c5aa
Update .github/workflows/code-pushup-fork.yml
BioPhoton Aug 20, 2025
0701f3b
Update .github/workflows/code-pushup.yml
BioPhoton Aug 20, 2025
95ac32f
chore: adjust GH action for CP
BioPhoton Aug 20, 2025
5dae379
chore: adjust GH action for CP 2
BioPhoton Aug 20, 2025
e7a50bd
chore: add nxCloudId
BioPhoton Aug 20, 2025
23d9f71
fix: adjust GH actions
BioPhoton Aug 20, 2025
7c792f9
chore: move config into targets
BioPhoton Aug 20, 2025
d114076
Update nx.json
BioPhoton Aug 21, 2025
84744b2
Merge remote-tracking branch 'origin/main' into add-plugin-targets
BioPhoton Aug 21, 2025
cfaedf8
fix: remove cloud id
BioPhoton Aug 21, 2025
2733442
fix: wip
BioPhoton Aug 21, 2025
c176d37
chore: cache js-packages and invalidate daily
BioPhoton Aug 21, 2025
e748af9
chore: update inputs
BioPhoton Aug 21, 2025
828d8fc
fix: test caching issue
BioPhoton Aug 21, 2025
bd4fb1f
fix: build step
BioPhoton Aug 22, 2025
0892245
fix: add required options to build target
BioPhoton Aug 22, 2025
858997f
wip
BioPhoton Aug 22, 2025
45c9bc4
Merge remote-tracking branch 'refs/remotes/origin/main' into add-plug…
BioPhoton Aug 22, 2025
8ffbd67
refactor: evert changes
BioPhoton Aug 22, 2025
6075043
refactor: keep vitest target empty in nx.json to pass e2e
BioPhoton Aug 22, 2025
ff016c4
refactor: make executor defaults meaningful
BioPhoton Aug 22, 2025
5a21526
Merge branch 'main' into add-plugin-targets
BioPhoton Aug 25, 2025
dab2bf7
refactor: fix lint
BioPhoton Aug 25, 2025
566c6da
refactor: fix targets merge bug
BioPhoton Aug 25, 2025
2881f07
chore: update packages to remove install warning
BioPhoton Aug 25, 2025
74f3f8a
Merge branch 'main' into add-plugin-targets
BioPhoton Aug 25, 2025
b17044d
Merge remote-tracking branch 'origin/main' into add-plugin-targets
BioPhoton Aug 25, 2025
51cc9ba
docs: fix typo in examples
BioPhoton Aug 25, 2025
59435da
chore: fix deps
BioPhoton Aug 25, 2025
75fb527
chore: remove deps
BioPhoton Aug 25, 2025
1a44ce0
chore: fix deps 2
BioPhoton Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/code-pushup-fork.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code PushUp (fork)
name: Code PushUp - Standalone Mode (fork)

# separated from code-pushup.yml for security reasons
# => requires permissions to create PR comment
Expand All @@ -20,19 +20,23 @@ permissions:
jobs:
code-pushup:
runs-on: ubuntu-latest
name: Code PushUp
name: Run Code PushUp (fork)
if: github.event.pull_request.head.repo.fork
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Run Code PushUp action
uses: code-pushup/github-action@v0
with:
bin: npx nx code-pushup --
bin: npx nx code-pushup --nx-bail --
10 changes: 7 additions & 3 deletions .github/workflows/code-pushup.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code PushUp
name: Code PushUp - Standalone Mode

on:
push:
Expand All @@ -16,7 +16,7 @@ permissions:
jobs:
code-pushup:
runs-on: ubuntu-latest
name: Code PushUp
name: Run Code PushUp
# ignore PRs from forks, handled by code-pushup-fork.yml
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
Expand All @@ -27,14 +27,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Set base and head for Nx affected commands
uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: npm ci
- name: Run Code PushUp action
uses: code-pushup/github-action@v0
with:
bin: npx nx code-pushup --
bin: npx nx code-pushup --nx-bail --
21 changes: 6 additions & 15 deletions code-pushup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dotenv/config';
import { z } from 'zod';
import {
coverageCoreConfigNx,
eslintCoreConfigNx,
Expand All @@ -11,25 +10,17 @@ import {
import type { CoreConfig } from './packages/models/src/index.js';
import { mergeConfigs } from './packages/utils/src/index.js';

// load upload configuration from environment
const envSchema = z.object({
CP_SERVER: z.string().url(),
CP_API_KEY: z.string().min(1),
CP_ORGANIZATION: z.string().min(1),
CP_PROJECT: z.string().min(1),
});
const { data: env } = await envSchema.safeParseAsync(process.env);
const project = process.env['NX_TASK_TARGET_PROJECT'] || 'cli-workspace';

const config: CoreConfig = {
...(env && {
...(process.env['CP_API_KEY'] && {
upload: {
server: env.CP_SERVER,
apiKey: env.CP_API_KEY,
organization: env.CP_ORGANIZATION,
project: 'cli-workspace',
project,
organization: 'code-pushup',
server: 'https://api.staging.code-pushup.dev/graphql',
apiKey: process.env['CP_API_KEY'],
},
}),

plugins: [],
};

Expand Down
13 changes: 7 additions & 6 deletions code-pushup.preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import coveragePlugin, {
getNxCoveragePaths,
} from './packages/plugin-coverage/src/index.js';
import eslintPlugin, {
eslintConfigFromNxProject,
eslintConfigFromAllNxProjects,
} from './packages/plugin-eslint/src/index.js';
import type { ESLintTarget } from './packages/plugin-eslint/src/lib/config.js';
import { nxProjectsToConfig } from './packages/plugin-eslint/src/lib/nx/projects-to-config.js';
Expand Down Expand Up @@ -172,11 +172,12 @@ export const eslintCoreConfigNx = async (
projectName?: string,
): Promise<CoreConfig> => ({
plugins: [
await eslintPlugin(
await (projectName
? eslintConfigFromNxProject(projectName)
: eslintConfigFromPublishableNxProjects()),
),
projectName
? await eslintPlugin({
eslintrc: `packages/${projectName}/eslint.config.js`,
patterns: ['.'],
})
: await eslintPlugin(await eslintConfigFromAllNxProjects()),
],
categories: eslintCategories,
});
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/code-pushup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
* `nx run-collect examples-plugins`
*
* - For all formats use `--persist.format=md,json`
* - For better debugging use `--verbose --no-progress`
* - For better debugging, use `--verbose --no-progress`
*
*/

Expand Down
Loading
Loading