Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nx-plugin): adjust upload config handling #937

Merged
merged 33 commits into from
Mar 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f653376
fix(nx-plugin): adjust upload config handling
BioPhoton Feb 14, 2025
ccce7b1
fix(nx-plugin): remove file extensions in imports
BioPhoton Feb 22, 2025
d10f1be
fix(nx-plugin): add createNodesV2
BioPhoton Feb 22, 2025
ff94e39
fix(nx-plugin): add createNodesV2
BioPhoton Feb 22, 2025
45c8667
ci: setup plugin
BioPhoton Feb 22, 2025
a3316bc
ci: setup cp for models
BioPhoton Feb 22, 2025
48143dc
wip
BioPhoton Feb 22, 2025
42f0bd4
wip
BioPhoton Mar 1, 2025
233cfd7
wip 1
BioPhoton Mar 3, 2025
c2ec88c
fix(nx-plugin): fix lint
BioPhoton Mar 5, 2025
15983d8
fix(nx-plugin): fix lint
BioPhoton Mar 5, 2025
3596149
fix: wip
BioPhoton Mar 5, 2025
d375686
docs: add js docs
BioPhoton Mar 5, 2025
bf87631
Merge branch 'main' into nx-plugin/fix-upload-config
BioPhoton Mar 5, 2025
a754393
refactor(nx-plugin): explicit import extensions
matejchalk Mar 10, 2025
2bcfcc7
Update packages/nx-plugin/src/plugin/target/targets.ts
BioPhoton Mar 10, 2025
385d77c
fix: update nx-verdaccio pkg (#954)
BioPhoton Mar 5, 2025
fa5635e
fix(utils): ignore non-json lines in fromJsonLines utility
matejchalk Mar 5, 2025
9e68eb1
fix(plugin-js-packages): ignore non-empty stderr
matejchalk Mar 5, 2025
88fd037
release: 0.64.2 [skip ci]
matejchalk Mar 5, 2025
00aae50
feat(utils): add score filter to md report generation (#956)
BioPhoton Mar 5, 2025
76c2b47
release: 0.65.0 [skip ci]
matejchalk Mar 5, 2025
2437497
fix: adjust logic
BioPhoton Mar 10, 2025
8de3562
Update packages/nx-plugin/eslint.config.js
BioPhoton Mar 10, 2025
f5cf751
fix: wip
BioPhoton Mar 10, 2025
fb846ff
fix: wip
BioPhoton Mar 10, 2025
59145b7
Merge branch 'main' into nx-plugin/fix-upload-config
BioPhoton Mar 10, 2025
90daca5
fix: e2e tests
BioPhoton Mar 10, 2025
acbd3ab
fix: e2e tests
BioPhoton Mar 10, 2025
3e32e37
fix: wip
BioPhoton Mar 10, 2025
7cf9479
fix: wip
BioPhoton Mar 10, 2025
74c39cb
fix: wip e2e
BioPhoton Mar 10, 2025
f17ce38
fix: wip e2e 2
BioPhoton Mar 10, 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
Prev Previous commit
Next Next commit
fix: wip e2e
  • Loading branch information
BioPhoton committed Mar 10, 2025
commit 74c39cb03009d2f325b3e2ba989c998598342f6d
51 changes: 26 additions & 25 deletions e2e/nx-plugin-e2e/tests/executor-cli.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
import { type Tree, updateProjectConfiguration } from '@nx/devkit';
import {type Tree, updateProjectConfiguration} from '@nx/devkit';
import path from 'node:path';
import { readProjectConfiguration } from 'nx/src/generators/utils/project-configuration';
import { afterEach, expect } from 'vitest';
import {
type AutorunCommandExecutorOptions,
generateCodePushupConfig,
} from '@code-pushup/nx-plugin';
import {
generateWorkspaceAndProject,
materializeTree,
nxTargetProject,
} from '@code-pushup/test-nx-utils';
import {
E2E_ENVIRONMENTS_DIR,
TEST_OUTPUT_DIR,
removeColorCodes,
teardownTestFolder,
} from '@code-pushup/test-utils';
import { executeProcess, readJsonFile } from '@code-pushup/utils';
import { INLINE_PLUGIN } from './inline-plugin.js';
import {readProjectConfiguration} from 'nx/src/generators/utils/project-configuration';
import {afterAll, afterEach, beforeEach, expect, vi} from 'vitest';
import {type AutorunCommandExecutorOptions, generateCodePushupConfig,} from '@code-pushup/nx-plugin';
import {generateWorkspaceAndProject, materializeTree, nxTargetProject,} from '@code-pushup/test-nx-utils';
import {E2E_ENVIRONMENTS_DIR, removeColorCodes, teardownTestFolder, TEST_OUTPUT_DIR,} from '@code-pushup/test-utils';
import {executeProcess, readJsonFile} from '@code-pushup/utils';
import {INLINE_PLUGIN} from './inline-plugin.js';

async function addTargetToWorkspace(
tree: Tree,
Expand Down Expand Up @@ -58,19 +46,32 @@ describe('executor command', () => {
TEST_OUTPUT_DIR,
'executor-cli',
);
const processEnvCP = Object.fromEntries(
Object.entries(process.env).filter(([k]) => k.startsWith('CP_')),
);

/* eslint-disable functional/immutable-data, @typescript-eslint/no-dynamic-delete */
beforeAll(() => {
Object.entries(process.env)
.filter(([k]) => k.startsWith('CP_'))
.forEach(([k]) => delete process.env[k]);
});

beforeEach(async () => {
beforeEach(() => {
vi.unstubAllEnvs();
tree = await generateWorkspaceAndProject(project);
vi.stubEnv('CP_ORGANIZATION', '');
vi.stubEnv('CP_PROJECT', '');
vi.stubEnv('CP_SERVER', '');
vi.stubEnv('CP_API_KEY', '');
});

afterEach(async () => {
await teardownTestFolder(testFileDir);
});

afterAll(() => {
Object.entries(processEnvCP).forEach(([k, v]) => (process.env[k] = v));
});
/* eslint-enable functional/immutable-data, @typescript-eslint/no-dynamic-delete */


it('should execute no specific command by default', async () => {
const cwd = path.join(testFileDir, 'execute-default-command');
await addTargetToWorkspace(tree, { cwd, project });
Expand Down
Loading