-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update e2e tasks, to only populate local registry once for all…
… tests
- Loading branch information
Showing
21 changed files
with
266 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { getPackageManagerCommand } from '@nx/devkit'; | ||
import { uniq } from '@nx/plugin/testing'; | ||
import { | ||
createTestProject, | ||
|
@@ -19,11 +20,14 @@ describe('nx-ktor e2e', () => { | |
|
||
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync(`npm install @nxrocks/[email protected]`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
}); | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
} | ||
); | ||
}); | ||
|
||
afterAll(() => { | ||
|
@@ -37,7 +41,7 @@ describe('nx-ktor e2e', () => { | |
|
||
it('should be installed', () => { | ||
// npm ls will fail if the package is not installed properly | ||
execSync('npm ls @nxrocks/nx-ktor', { | ||
execSync(`${getPackageManagerCommand().list} @nxrocks/nx-ktor`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import { checkFilesExist, createTestProject, runNxCommandAsync } from '@nxrocks/common/testing'; | ||
import { getPackageManagerCommand } from '@nx/devkit'; | ||
import { | ||
checkFilesExist, | ||
createTestProject, | ||
runNxCommandAsync, | ||
} from '@nxrocks/common/testing'; | ||
import { execSync } from 'child_process'; | ||
import { rmSync } from 'fs-extra'; | ||
|
||
|
@@ -10,24 +15,28 @@ describe('nx-melos e2e', () => { | |
|
||
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync(`npm install @nxrocks/[email protected]`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
}); | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
} | ||
); | ||
}); | ||
|
||
afterAll(() => { | ||
// Cleanup the test project | ||
projectDirectory && rmSync(projectDirectory, { | ||
recursive: true, | ||
force: true, | ||
}); | ||
projectDirectory && | ||
rmSync(projectDirectory, { | ||
recursive: true, | ||
force: true, | ||
}); | ||
}); | ||
|
||
it('should be installed', () => { | ||
// npm ls will fail if the package is not installed properly | ||
execSync('npm ls @nxrocks/nx-melos', { | ||
execSync(`${getPackageManagerCommand().list} @nxrocks/nx-melos`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { getPackageManagerCommand } from '@nx/devkit'; | ||
import { uniq } from '@nx/plugin/testing'; | ||
import { | ||
createTestProject, | ||
|
@@ -20,11 +21,14 @@ describe('nx-micronaut e2e', () => { | |
|
||
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync(`npm install @nxrocks/[email protected]`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
}); | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
} | ||
); | ||
}); | ||
|
||
afterAll(() => { | ||
|
@@ -38,7 +42,7 @@ describe('nx-micronaut e2e', () => { | |
|
||
it('should be installed', () => { | ||
// npm ls will fail if the package is not installed properly | ||
execSync('npm ls @nxrocks/nx-micronaut', { | ||
execSync(`${getPackageManagerCommand().list} @nxrocks/nx-micronaut`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { getPackageManagerCommand } from '@nx/devkit'; | ||
import { uniq } from '@nx/plugin/testing'; | ||
import { | ||
createTestProject, | ||
|
@@ -21,11 +22,14 @@ describe('nx-quarkus e2e', () => { | |
|
||
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync(`npm install @nxrocks/[email protected]`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
}); | ||
execSync( | ||
`${getPackageManagerCommand().add} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
} | ||
); | ||
}); | ||
|
||
afterAll(() => { | ||
|
@@ -39,7 +43,7 @@ describe('nx-quarkus e2e', () => { | |
|
||
it('should be installed', () => { | ||
// npm ls will fail if the package is not installed properly | ||
execSync('npm ls @nxrocks/nx-quarkus', { | ||
execSync(`${getPackageManagerCommand().list} @nxrocks/nx-quarkus`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
}); | ||
|
@@ -83,7 +87,6 @@ describe('nx-quarkus e2e', () => { | |
`should create a quarkus '$projectType' with given options`, | ||
async ({ projectType }) => { | ||
const prjName = uniq('nx-quarkus'); | ||
const prjDir = projectType === 'application' ? 'apps' : 'libs'; | ||
const buildSystem = 'MAVEN'; | ||
const groupId = 'com.tinesoft'; | ||
const artifactId = 'api'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import { | |
runNxCommandAsync, | ||
tmpProjPath, | ||
} from '@nxrocks/common-jvm/testing'; | ||
import { names } from '@nx/devkit'; | ||
import { getPackageManagerCommand, names } from '@nx/devkit'; | ||
|
||
import { lstatSync, rmSync } from 'fs'; | ||
import { execSync } from 'child_process'; | ||
|
@@ -22,11 +22,14 @@ describe('nx-spring-boot e2e', () => { | |
|
||
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync(`npm install @nxrocks/[email protected]`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
}); | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
} | ||
); | ||
}); | ||
|
||
afterAll(() => { | ||
|
@@ -39,7 +42,7 @@ describe('nx-spring-boot e2e', () => { | |
|
||
it('should be installed', () => { | ||
// npm ls will fail if the package is not installed properly | ||
execSync('npm ls @nxrocks/nx-spring-boot', { | ||
execSync(`${getPackageManagerCommand().list} @nxrocks/nx-spring-boot`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.