Skip to content

Commit

Permalink
fix(core): pass env vars to e2es that are relevant for atomizer
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless committed Jul 16, 2024
1 parent 0eb2f2e commit f8b3759
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/generated/packages/nx/executors/atomizer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"schema": {
"version": 2,
"title": "Atomizer",
"description": "An executor that is used as the root task for atomized tasks. Ensures it's being run in distribution and otherwise does nothing.",
"description": "An executor that is used as the root task for atomized tasks. Ensures it's being run in distribution and otherwise does nothing. [Learn more about the Atomizer, its benefits and why you should only run it with distribution.](https://nx.dev/ci/features/split-e2e-tasks#benefits) ",
"type": "object",
"cli": "nx",
"outputCapture": "pipe",
Expand Down
5 changes: 4 additions & 1 deletion e2e/jest/src/jest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { stripIndents } from '@angular-devkit/core/src/utils/literals';
import {
cleanupProject,
expectJestTestsToPass,
getStrippedEnvironmentVariables,
newProject,
runCLI,
runCLIAsync,
Expand Down Expand Up @@ -163,7 +164,9 @@ describe('Jest', () => {

await runCLIAsync(`e2e-ci ${libName}`, {
env: {
NX_SKIP_ATOMIZER_VALIDATION: 'true',
...getStrippedEnvironmentVariables(),
// e2e-ci will only run with DTE so we set this for local testing
NX_AGENT_NAME: process.env['NX_AGENT_NAME'] ?? 'fake-agent-00',
},
});
}, 90000);
Expand Down
3 changes: 2 additions & 1 deletion e2e/next/src/next.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ describe('Next.js Applications', () => {
const e2eResults = runCLI(`e2e-ci ${appName}-e2e --verbose`, {
verbose: true,
env: {
NX_SKIP_ATOMIZER_VALIDATION: 'true',
// e2e-ci will only run with DTE so we set this for local testing
NX_AGENT_NAME: process.env['NX_AGENT_NAME'] ?? 'fake-agent-00',
},
});
expect(e2eResults).toContain(
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/executors/atomizer/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"title": "Atomizer",
"description": "An executor that is used as the root task for atomized tasks. Ensures it's being run in distribution and otherwise does nothing.",
"description": "An executor that is used as the root task for atomized tasks. Ensures it's being run in distribution and otherwise does nothing. [Learn more about the Atomizer, its benefits and why you should only run it with distribution.](https://nx.dev/ci/features/split-e2e-tasks#benefits) ",
"type": "object",
"cli": "nx",
"outputCapture": "pipe",
Expand Down

0 comments on commit f8b3759

Please sign in to comment.