diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2dd19e2..234a4948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e" targets have been requested - - run: pnpm exec nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e-ci" --with-env-vars="ANDROID_SDK_VERSION,FLUTTER_VERSION,JDK_VERSION" + - run: pnpm exec nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e" --with-env-vars="ANDROID_SDK_VERSION,FLUTTER_VERSION,JDK_VERSION" # This line is needed for nx affected to work when CI is running on a PR - run: git branch --track develop origin/develop || exit 0 @@ -46,4 +46,4 @@ jobs: main-branch-name: 'develop' - run: pnpm exec nx-cloud record -- nx format:check - - run: pnpm exec nx affected -t lint test build e2e-ci --parallel=5 --exclude=smoke --codeCoverage + - run: pnpm exec nx affected -t lint test-ci build e2e --parallel=5 --exclude=smoke diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 98ea2791..41908693 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -34,4 +34,4 @@ jobs: env: NX_E2E_CI_CACHE_KEY: smoke-gha-${{ matrix.os }}-${{ matrix.node-version }} NX_RUN_GROUP: ${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }} - run: pnpm nx test smoke + run: pnpm nx e2e-ci smoke diff --git a/e2e/nx-flutter-e2e/project.json b/e2e/nx-flutter-e2e/project.json index ad42bbbd..2ce66adb 100644 --- a/e2e/nx-flutter-e2e/project.json +++ b/e2e/nx-flutter-e2e/project.json @@ -5,15 +5,5 @@ "sourceRoot": "e2e/nx-flutter-e2e/tests", "tags": ["e2e"], "implicitDependencies": ["nx-flutter"], - "targets": { - "e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "e2e/nx-flutter-e2e/jest.config.ts", - "runInBand": true - }, - "dependsOn": ["^build"] - } - } + "targets": {} } diff --git a/e2e/nx-ktor-e2e/project.json b/e2e/nx-ktor-e2e/project.json index 17a4811b..1e5fab92 100644 --- a/e2e/nx-ktor-e2e/project.json +++ b/e2e/nx-ktor-e2e/project.json @@ -5,15 +5,5 @@ "sourceRoot": "e2e/nx-ktor-e2e/tests", "tags": ["e2e"], "implicitDependencies": ["nx-ktor"], - "targets": { - "e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "e2e/nx-ktor-e2e/jest.config.ts", - "runInBand": true - }, - "dependsOn": ["^build"] - } - } + "targets": {} } diff --git a/e2e/nx-melos-e2e/project.json b/e2e/nx-melos-e2e/project.json index d1905abb..c916cc05 100644 --- a/e2e/nx-melos-e2e/project.json +++ b/e2e/nx-melos-e2e/project.json @@ -5,15 +5,5 @@ "sourceRoot": "e2e/nx-melos-e2e/tests", "tags": ["e2e"], "implicitDependencies": ["nx-melos"], - "targets": { - "e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "e2e/nx-melos-e2e/jest.config.ts", - "runInBand": true - }, - "dependsOn": ["^build"] - } - } + "targets": {} } diff --git a/e2e/nx-micronaut-e2e/project.json b/e2e/nx-micronaut-e2e/project.json index 7dde94f7..edd07eed 100644 --- a/e2e/nx-micronaut-e2e/project.json +++ b/e2e/nx-micronaut-e2e/project.json @@ -7,13 +7,25 @@ "implicitDependencies": ["nx-micronaut"], "targets": { "e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "inputs": [ + "default", + "^default", + "{workspaceRoot}/jest.preset.js", + { + "externalDependencies": ["jest"] + } + ], "options": { - "jestConfig": "e2e/nx-micronaut-e2e/jest.config.ts", + "passWithNoTests": true, "runInBand": true }, - "dependsOn": ["^build"] + "dependsOn": ["^build"], + "configurations": { + "ci": { + "ci": true, + "coverage": true + } + } } } } diff --git a/e2e/nx-quarkus-e2e/project.json b/e2e/nx-quarkus-e2e/project.json index 2d1d8b72..013a1ebd 100644 --- a/e2e/nx-quarkus-e2e/project.json +++ b/e2e/nx-quarkus-e2e/project.json @@ -5,15 +5,5 @@ "sourceRoot": "e2e/nx-quarkus-e2e/tests", "tags": ["e2e"], "implicitDependencies": ["nx-quarkus"], - "targets": { - "e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "e2e/nx-quarkus-e2e/jest.config.ts", - "runInBand": true - }, - "dependsOn": ["^build"] - } - } + "targets": {} } diff --git a/e2e/nx-spring-boot-e2e/project.json b/e2e/nx-spring-boot-e2e/project.json index 2935a70b..c7001829 100644 --- a/e2e/nx-spring-boot-e2e/project.json +++ b/e2e/nx-spring-boot-e2e/project.json @@ -5,15 +5,5 @@ "sourceRoot": "e2e/nx-spring-boot-e2e/tests", "tags": ["e2e"], "implicitDependencies": ["nx-spring-boot"], - "targets": { - "e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "e2e/nx-spring-boot-e2e/jest.config.ts", - "runInBand": true - }, - "dependsOn": ["^build"] - } - } + "targets": {} } diff --git a/e2e/smoke/project.json b/e2e/smoke/project.json index b5e1a18f..731047ab 100644 --- a/e2e/smoke/project.json +++ b/e2e/smoke/project.json @@ -12,14 +12,5 @@ "nx-ktor", "nx-melos" ], - "targets": { - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/e2e/smoke"], - "options": { - "jestConfig": "e2e/smoke/jest.config.ts" - }, - "dependsOn": ["^build"] - } - } + "targets": {} } diff --git a/e2e/smoke/tests/smoke.spec.ts b/e2e/smoke/tests/smoke.spec.ts new file mode 100644 index 00000000..08e6ba3e --- /dev/null +++ b/e2e/smoke/tests/smoke.spec.ts @@ -0,0 +1,173 @@ +import { getPackageManagerCommand } from '@nx/devkit'; +import { + createTestProject, + isLocalNxMatchingLatestFeatureVersion, + runNxCommand, +} from '@nxrocks/common/testing'; +import { execSync } from 'child_process'; +import { rmSync } from 'fs-extra'; + +process.env.NODE_OPTIONS = '--max-old-space-size=8192'; // to avoid oom error during the tests + +let projectDirectory: string; + +const execSyncOptions: (cwd?: string) => { + silenceError?: boolean; + env?: NodeJS.ProcessEnv; + cwd?: string; +} = (cwd: string = projectDirectory) => ({ + cwd: cwd, + env: { + ...process.env, + GIT_COMMITTER_NAME: 'Smoke Test CI', + GIT_COMMITTER_EMAIL: 'no-reply@fake.com', + GIT_AUTHOR_NAME: 'Smoke Test CI', + GIT_AUTHOR_EMAIL: 'no-reply@fake.com', + }, + silentError: 'false', +}); + +const bootapp = 'bootapp'; +const bootlib = 'bootlib'; +const quarkusapp = 'quarkusapp'; +const quarkuslib = 'quarkuslib'; +const flutterapp = 'flutterapp'; +const flutterlib = 'flutterlib'; +const mnApp = 'mnapp'; +const krApp = 'krapp'; + +describe('nxrocks smoke tests', () => { + afterEach(async () => { + if (!process.env.KEEP_SMOKE_TESTS_DIR) { + // Cleanup the test project + projectDirectory && + rmSync(projectDirectory, { + recursive: true, + force: true, + }); + } else { + console.warn( + `Keeping smoke test directory at '${projectDirectory}'. Do not forget to remove it when done!` + ); + } + }); + + it.each` + pkgManager | workspaceVersion | pluginVersion + ${'npm'} | ${'latest'} | ${'0.0.0-e2e'} + ${'yarn'} | ${'latest'} | ${'0.0.0-e2e'} + ${'pnpm'} | ${'latest'} | ${'0.0.0-e2e'} + ${'npm'} | ${'local'} | ${'0.0.0-e2e'} + ${'yarn'} | ${'local'} | ${'0.0.0-e2e'} + ${'pnpm'} | ${'local'} | ${'0.0.0-e2e'} + `( + `should sucessfully run using '$workspaceVersion' Nx workspace, $pluginVersion plugins version and $pkgManager package manager`, + async ({ pkgManager, workspaceVersion, pluginVersion }) => { + if (!process.env.CI && !process.env.FORCE_SMOKE_TESTS) { + console.log( + 'Skipping smoke test because not running on CI and FORCE_SMOKE_TESTS is not set' + ); + return; + } + + if ( + workspaceVersion === 'latest' && + isLocalNxMatchingLatestFeatureVersion() + ) { + console.log( + 'Skipping current test case because we are already using most recent version of Nx' + ); + return; + } + + projectDirectory = createTestProject( + pkgManager, + 'nxrocks-smoke', + workspaceVersion + ); + + execSync('git init', execSyncOptions()); + + const pluginPkgs = [ + `@nxrocks/nx-spring-boot@${pluginVersion}`, + `@nxrocks/nx-quarkus@${pluginVersion}`, + `@nxrocks/nx-micronaut@${pluginVersion}`, + `@nxrocks/nx-flutter@${pluginVersion}`, + `@nxrocks/nx-melos@${pluginVersion}`, + `@nxrocks/nx-ktor@${pluginVersion}`, + ].join(' '); + + execSync( + `${getPackageManagerCommand(pkgManager).addDev} ${pluginPkgs}`, + execSyncOptions(projectDirectory) + ); + + runNxCommand( + `generate @nxrocks/nx-spring-boot:new ${bootapp} --skip-format=false --projectType application --no-interactive`, + pkgManager, + execSyncOptions() + ); + runNxCommand( + `generate @nxrocks/nx-spring-boot:new ${bootlib} --skip-format=false --projectType library --no-interactive`, + pkgManager, + execSyncOptions() + ); + + runNxCommand( + `generate @nxrocks/nx-quarkus:new ${quarkusapp} --skip-format=false --projectType application --no-interactive`, + pkgManager, + execSyncOptions() + ); + runNxCommand( + `generate @nxrocks/nx-quarkus:new ${quarkuslib} --skip-format=false --projectType library --no-interactive`, + pkgManager, + execSyncOptions() + ); + + runNxCommand( + `generate @nxrocks/nx-micronaut:new ${mnApp} --skip-format=false --no-interactive`, + pkgManager, + execSyncOptions() + ); + + runNxCommand( + `generate @nxrocks/nx-melos:init --scriptNameSeparator=-`, + pkgManager, + execSyncOptions() + ); + + runNxCommand( + `generate @nxrocks/nx-ktor:new ${krApp} --skip-format=false --no-interactive`, + pkgManager, + execSyncOptions() + ); + + runNxCommand( + `generate @nxrocks/nx-flutter:new ${flutterapp} --template app --no-interactive`, + pkgManager, + execSyncOptions() + ); + runNxCommand( + `generate @nxrocks/nx-flutter:new ${flutterlib} --template plugin --no-interactive`, + pkgManager, + execSyncOptions() + ); + + execSync(`git add -A`, execSyncOptions()); + execSync(`git commit -am "chore: scaffold projects"`, execSyncOptions()); + + runNxCommand(`clean ${bootapp}`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${bootlib}`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${quarkusapp}`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${quarkuslib}`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${mnApp}`, pkgManager, execSyncOptions()); + runNxCommand(`melos-bootstrap`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${flutterapp}`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${flutterlib}`, pkgManager, execSyncOptions()); + runNxCommand(`clean ${krApp}`, pkgManager, execSyncOptions()); + + expect(true).toBeTruthy(); + }, + 3600000 + ); +}); diff --git a/e2e/smoke/tests/smoke.test.ts b/e2e/smoke/tests/smoke.test.ts deleted file mode 100644 index 588a009a..00000000 --- a/e2e/smoke/tests/smoke.test.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { getPackageManagerCommand } from '@nx/devkit'; -import { createTestProject, isLocalNxMatchingLatestFeatureVersion, runNxCommand} from '@nxrocks/common/testing'; -import { execSync } from 'child_process'; -import { rmSync } from 'fs-extra'; - -process.env.NODE_OPTIONS="--max-old-space-size=8192"; // to avoid oom error during the tests - -let projectDirectory: string; - -const execSyncOptions: (cwd?:string) => { silenceError?: boolean; env?: NodeJS.ProcessEnv; cwd?: string } = (cwd:string = projectDirectory) => ({ - cwd: cwd, - env: { - ...process.env, - GIT_COMMITTER_NAME: 'Smoke Test CI', - GIT_COMMITTER_EMAIL: 'no-reply@fake.com', - GIT_AUTHOR_NAME: 'Smoke Test CI', - GIT_AUTHOR_EMAIL: 'no-reply@fake.com', - }, - silentError: 'false', -}); - -const bootapp = 'bootapp'; -const bootlib = 'bootlib'; -const quarkusapp = 'quarkusapp'; -const quarkuslib = 'quarkuslib'; -const flutterapp = 'flutterapp'; -const flutterlib = 'flutterlib'; -const mnApp = 'mnapp'; -const krApp = 'krapp'; - -describe('nxrocks smoke tests', () => { - - afterEach(async () => { - if(!process.env.KEEP_SMOKE_TESTS_DIR) { - // Cleanup the test project - projectDirectory && rmSync(projectDirectory, { - recursive: true, - force: true, - }); - } - else { - console.warn(`Keeping smoke test directory at '${projectDirectory}'. Do not forget to remove it when done!`); - } - }); - - it.each` - pkgManager | workspaceVersion | pluginVersion - ${'npm'} | ${'latest'} | ${'0.0.0-e2e'} - ${'yarn'} | ${'latest'} | ${'0.0.0-e2e'} - ${'pnpm'} | ${'latest'} | ${'0.0.0-e2e'} - ${'npm'} | ${'local'} | ${'0.0.0-e2e'} - ${'yarn'} | ${'local'} | ${'0.0.0-e2e'} - ${'pnpm'} | ${'local'} | ${'0.0.0-e2e'} -`(`should sucessfully run using '$workspaceVersion' Nx workspace, $pluginVersion plugins version and $pkgManager package manager`, async ({pkgManager, workspaceVersion, pluginVersion }) => { - - if(!process.env.CI && !process.env.FORCE_SMOKE_TESTS) { - console.log('Skipping smoke test because not running on CI and FORCE_SMOKE_TESTS is not set'); - return; - } - - if(workspaceVersion === 'latest' && isLocalNxMatchingLatestFeatureVersion()) { - console.log('Skipping current test case because we are already using most recent version of Nx'); - return; - } - - projectDirectory = createTestProject(pkgManager, 'nxrocks-smoke', workspaceVersion); - - execSync('git init', execSyncOptions()); - - const pluginPkgs = [ - `@nxrocks/nx-spring-boot@${pluginVersion}`, - `@nxrocks/nx-quarkus@${pluginVersion}`, - `@nxrocks/nx-micronaut@${pluginVersion}`, - `@nxrocks/nx-flutter@${pluginVersion}`, - `@nxrocks/nx-melos@${pluginVersion}`, - `@nxrocks/nx-ktor@${pluginVersion}`, - ].join(' '); - - execSync(`${getPackageManagerCommand(pkgManager).addDev} ${pluginPkgs}`, execSyncOptions(projectDirectory)); - - - runNxCommand( - `generate @nxrocks/nx-spring-boot:new ${bootapp} --skip-format=false --projectType application --no-interactive`, - pkgManager, - execSyncOptions(), - ); - runNxCommand( - `generate @nxrocks/nx-spring-boot:new ${bootlib} --skip-format=false --projectType library --no-interactive`, - pkgManager, - execSyncOptions(), - ); - - runNxCommand( - `generate @nxrocks/nx-quarkus:new ${quarkusapp} --skip-format=false --projectType application --no-interactive`, - pkgManager, - execSyncOptions(), - ); - runNxCommand( - `generate @nxrocks/nx-quarkus:new ${quarkuslib} --skip-format=false --projectType library --no-interactive`, - pkgManager, - execSyncOptions(), - ); - - runNxCommand( - `generate @nxrocks/nx-micronaut:new ${mnApp} --skip-format=false --no-interactive`, - pkgManager, - execSyncOptions(), - ); - - runNxCommand( - `generate @nxrocks/nx-melos:init --scriptNameSeparator=-`, - pkgManager, - execSyncOptions(), - ); - - runNxCommand( - `generate @nxrocks/nx-ktor:new ${krApp} --skip-format=false --no-interactive`, - pkgManager, - execSyncOptions(), - ); - - runNxCommand( - `generate @nxrocks/nx-flutter:new ${flutterapp} --template app --no-interactive`, - pkgManager, - execSyncOptions(), - ); - runNxCommand( - `generate @nxrocks/nx-flutter:new ${flutterlib} --template plugin --no-interactive`, - pkgManager, - execSyncOptions(), - ); - - execSync(`git add -A`, execSyncOptions()); - execSync(`git commit -am "chore: scaffold projects"`, execSyncOptions()); - - runNxCommand(`clean ${bootapp}`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${bootlib}`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${quarkusapp}`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${quarkuslib}`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${mnApp}`, pkgManager, execSyncOptions()); - runNxCommand(`melos-bootstrap`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${flutterapp}`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${flutterlib}`, pkgManager, execSyncOptions()); - runNxCommand(`clean ${krApp}`, pkgManager, execSyncOptions()); - - - expect(true).toBeTruthy(); - }, 3600000); - -}); \ No newline at end of file diff --git a/nx.json b/nx.json index 980a191f..66411811 100644 --- a/nx.json +++ b/nx.json @@ -40,6 +40,43 @@ }, "$schema": "./node_modules/nx/schemas/nx-schema.json", "targetDefaults": { + "test": { + "options": { + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "coverage": true + } + } + }, + "e2e": { + "options": { + "passWithNoTests": true, + "runInBand": true + }, + "dependsOn": ["^build"], + "configurations": { + "ci": { + "ci": true, + "coverage": true + } + } + }, + "e2e-ci": { + "options": { + "passWithNoTests": true, + "runInBand": true + }, + "dependsOn": ["^build"], + "configurations": { + "ci": { + "ci": true, + "coverage": true + } + } + }, "nx-release-publish": { "options": { "packageRoot": "dist/packages/{projectName}" @@ -58,19 +95,6 @@ "{workspaceRoot}/.eslintignore", "{workspaceRoot}/eslint.config.js" ] - }, - "@nx/jest:jest": { - "cache": true, - "inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "codeCoverage": true - } - } } }, "nxCloudAccessToken": "ZDRmZDczZWUtMDU2My00YzQ0LTlkMWEtZjM2YjZlZWNmNGIxfHJlYWQ=", @@ -82,6 +106,45 @@ "targetName": "eslint:lint", "extensions": ["ts", "tsx", "js", "jsx", "html", "vue"] } + }, + { + "plugin": "@nx/jest/plugin", + "options": { + "targetName": "e2e", + "ciTargetName": "e2e-ci" + }, + "include": [ + "e2e/nx-flutter-e2e/**/*", + "e2e/nx-ktor-e2e/**/*", + "e2e/nx-melos-e2e/**/*", + "e2e/nx-micronaut-e2e/**/*", + "e2e/nx-quarkus-e2e/**/*", + "e2e/nx-spring-boot-e2e/**/*", + "e2e/smoke/**/*" + ] + }, + { + "plugin": "@nx/jest/plugin", + "options": { + "targetName": "test", + "ciTargetName": "test-ci" + }, + "include": [ + "packages/common/**/*", + "packages/common-cli/**/*", + "packages/common-jvm/**/*", + "packages/create-nx-flutter/**/*", + "packages/create-nx-ktor/**/*", + "packages/create-nx-micronaut/**/*", + "packages/create-nx-quarkus/**/*", + "packages/create-nx-spring-boot/**/*", + "packages/nx-flutter/**/*", + "packages/nx-ktor/**/*", + "packages/nx-melos/**/*", + "packages/nx-micronaut/**/*", + "packages/nx-quarkus/**/*", + "packages/nx-spring-boot/**/*" + ] } ], "namedInputs": { diff --git a/package.json b/package.json index 811d8ef2..d3f259a0 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,12 @@ "scripts": { "nx": "nx", "build": "nx run-many --target build --parallel 4 --exclude smoke", - "test": "nx run-many --target test --parallel 4 --exclude smoke --runInBand", + "test": "nx run-many --target test --parallel 4", "e2e": "ts-node -P ./tools/tsconfig.tools.json ./tools/scripts/run-all-e2e-tests.ts", "lint": "nx run-many --target lint --fix --parallel 4 --exclude smoke", "affected:build": "nx affected --target build --exclude=smoke", "affected:e2e": "nx affected --target e2e --exclude=smoke", - "affected:test": "nx affected --target test --exclude=smoke", + "affected:test": "nx affected --target test", "affected:lint": "nx affected --target lint --fix", "affected:format": "nx affected --target format", "affected:graph": "nx affected --graph", @@ -21,7 +21,7 @@ "help": "nx help", "release": "nx release --dry-run -- --skip-nx-cache", "prepare": "husky", - "smoke": "FORCE_SMOKE_TESTS=true nx test smoke", + "smoke": "FORCE_SMOKE_TESTS=true nx e2e smoke", "smoke-keep": "KEEP_SMOKE_TESTS_DIR=true pnpm smoke", "sync-preset-schemas": "ts-node -P ./tools/tsconfig.tools.json ./tools/scripts/sync-preset-schemas.ts" }, diff --git a/packages/common-cli/project.json b/packages/common-cli/project.json index 0c3bb501..a0ea649b 100644 --- a/packages/common-cli/project.json +++ b/packages/common-cli/project.json @@ -22,16 +22,6 @@ "tsConfig": "packages/common-cli/tsconfig.lib.json", "assets": ["packages/common-cli/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/common-cli/jest.config.ts" - } } } } diff --git a/packages/common-jvm/project.json b/packages/common-jvm/project.json index 0928f1f8..24718ff4 100644 --- a/packages/common-jvm/project.json +++ b/packages/common-jvm/project.json @@ -22,16 +22,6 @@ "tsConfig": "packages/common-jvm/tsconfig.lib.json", "assets": ["packages/common-jvm/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/common-jvm/jest.config.ts" - } } } } diff --git a/packages/common/project.json b/packages/common/project.json index 34b1b039..6bfe74c9 100644 --- a/packages/common/project.json +++ b/packages/common/project.json @@ -22,16 +22,6 @@ "tsConfig": "packages/common/tsconfig.lib.json", "assets": ["packages/common/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/common/jest.config.ts" - } } } } diff --git a/packages/create-nx-flutter/project.json b/packages/create-nx-flutter/project.json index 3175bd31..3bfa80a2 100644 --- a/packages/create-nx-flutter/project.json +++ b/packages/create-nx-flutter/project.json @@ -23,16 +23,6 @@ "tsConfig": "packages/create-nx-flutter/tsconfig.lib.json", "assets": ["packages/create-nx-flutter/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/create-nx-flutter/jest.config.ts" - } } } } diff --git a/packages/create-nx-ktor/project.json b/packages/create-nx-ktor/project.json index bba073d7..46a95ab9 100644 --- a/packages/create-nx-ktor/project.json +++ b/packages/create-nx-ktor/project.json @@ -23,16 +23,6 @@ "tsConfig": "packages/create-nx-ktor/tsconfig.lib.json", "assets": ["packages/create-nx-ktor/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/create-nx-ktor/jest.config.ts" - } } } } diff --git a/packages/create-nx-micronaut/project.json b/packages/create-nx-micronaut/project.json index 4d489529..22d4b722 100644 --- a/packages/create-nx-micronaut/project.json +++ b/packages/create-nx-micronaut/project.json @@ -28,10 +28,22 @@ "executor": "@nx/eslint:lint" }, "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "inputs": [ + "default", + "^default", + "{workspaceRoot}/jest.preset.js", + { + "externalDependencies": ["jest"] + } + ], "options": { - "jestConfig": "packages/create-nx-micronaut/jest.config.ts" + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "coverage": true + } } } } diff --git a/packages/create-nx-quarkus/project.json b/packages/create-nx-quarkus/project.json index 6ecf7fe3..66a3fae1 100644 --- a/packages/create-nx-quarkus/project.json +++ b/packages/create-nx-quarkus/project.json @@ -23,16 +23,6 @@ "tsConfig": "packages/create-nx-quarkus/tsconfig.lib.json", "assets": ["packages/create-nx-quarkus/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/create-nx-quarkus/jest.config.ts" - } } } } diff --git a/packages/create-nx-spring-boot/project.json b/packages/create-nx-spring-boot/project.json index 32baa1ca..ed280dba 100644 --- a/packages/create-nx-spring-boot/project.json +++ b/packages/create-nx-spring-boot/project.json @@ -23,16 +23,6 @@ "tsConfig": "packages/create-nx-spring-boot/tsconfig.lib.json", "assets": ["packages/create-nx-spring-boot/*.md"] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/create-nx-spring-boot/jest.config.ts" - } } } } diff --git a/packages/nx-flutter/project.json b/packages/nx-flutter/project.json index 31dc30e7..42766272 100644 --- a/packages/nx-flutter/project.json +++ b/packages/nx-flutter/project.json @@ -45,16 +45,6 @@ } ] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/nx-flutter/jest.config.ts" - } } } } diff --git a/packages/nx-ktor/project.json b/packages/nx-ktor/project.json index 7cd400ef..a8360325 100644 --- a/packages/nx-ktor/project.json +++ b/packages/nx-ktor/project.json @@ -49,16 +49,6 @@ } ] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/nx-ktor/jest.config.ts" - } } } } diff --git a/packages/nx-melos/project.json b/packages/nx-melos/project.json index ee28c54d..34c30a4e 100644 --- a/packages/nx-melos/project.json +++ b/packages/nx-melos/project.json @@ -44,16 +44,6 @@ } ] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/nx-melos/jest.config.ts" - } } } } diff --git a/packages/nx-micronaut/project.json b/packages/nx-micronaut/project.json index df80c5ee..07782227 100644 --- a/packages/nx-micronaut/project.json +++ b/packages/nx-micronaut/project.json @@ -50,16 +50,6 @@ } ] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/nx-micronaut/jest.config.ts" - } } } } diff --git a/packages/nx-quarkus/project.json b/packages/nx-quarkus/project.json index e6a3c3d9..90f71903 100644 --- a/packages/nx-quarkus/project.json +++ b/packages/nx-quarkus/project.json @@ -50,16 +50,6 @@ } ] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/nx-quarkus/jest.config.ts" - } } } } diff --git a/packages/nx-spring-boot/project.json b/packages/nx-spring-boot/project.json index 78cbc0ea..a3b98b67 100644 --- a/packages/nx-spring-boot/project.json +++ b/packages/nx-spring-boot/project.json @@ -50,16 +50,6 @@ } ] } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "packages/nx-spring-boot/jest.config.ts" - } } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f82f4b00..82435add 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6070,21 +6070,6 @@ snapshots: - typescript - verdaccio - '@nrwl/js@19.6.4(@babel/traverse@7.23.9)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.4.5)(verdaccio@5.0.4(typanion@3.12.1))': - dependencies: - '@nx/js': 19.6.4(@babel/traverse@7.23.9)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.4.5)(verdaccio@5.0.4(typanion@3.12.1)) - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - debug - - nx - - supports-color - - typescript - - verdaccio - '@nrwl/js@19.6.4(@babel/traverse@7.23.9)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.5.4)(verdaccio@5.0.4(typanion@3.12.1))': dependencies: '@nx/js': 19.6.4(@babel/traverse@7.23.9)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.5.4)(verdaccio@5.0.4(typanion@3.12.1)) @@ -6262,7 +6247,7 @@ snapshots: '@babel/preset-env': 7.23.9(@babel/core@7.23.9) '@babel/preset-typescript': 7.22.5(@babel/core@7.23.9) '@babel/runtime': 7.22.6 - '@nrwl/js': 19.6.4(@babel/traverse@7.23.9)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.4.5)(verdaccio@5.0.4(typanion@3.12.1)) + '@nrwl/js': 19.6.4(@babel/traverse@7.23.9)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.5.4)(verdaccio@5.0.4(typanion@3.12.1)) '@nx/devkit': 19.6.4(nx@19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11))) '@nx/workspace': 19.6.4(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.5.4))(@swc/core@1.5.7(@swc/helpers@0.5.11)) babel-plugin-const-enum: 1.2.0(@babel/core@7.23.9) diff --git a/tools/scripts/run-all-e2e-tests.ts b/tools/scripts/run-all-e2e-tests.ts index 66c83909..2bd6fa33 100644 --- a/tools/scripts/run-all-e2e-tests.ts +++ b/tools/scripts/run-all-e2e-tests.ts @@ -9,7 +9,7 @@ import stopRegistry from './stop-local-registry'; const nx = require.resolve('nx'); execFileSync( nx, - ['affected', '-t', 'e2e', '--runInBand'], + ['affected', '-t', 'e2e', '--runInBand', '--exclude', 'smoke'], { env: { ...process.env,