chore: nx-cloud setup (#10110)

This commit is contained in:
Nathan Walker
2022-11-29 13:26:51 -08:00
committed by GitHub
parent b147612e06
commit 9a779dfa8a
8 changed files with 44 additions and 14 deletions

1
.gitignore vendored
View File

@ -43,6 +43,7 @@ apps/**/*/platforms
apps/**/*/webpack.*.js
*.tgz
.npmrc
**/**/*.log
# System Files
.DS_Store

View File

@ -4,6 +4,10 @@
"sourceRoot": "apps/automated/app",
"projectType": "application",
"prefix": "nativescript",
"namedInputs": {
"default": ["{projectRoot}/**/*"],
"production": ["!{projectRoot}/**/*.spec.ts"]
},
"targets": {
"build": {
"executor": "@nativescript/nx:build",
@ -17,6 +21,8 @@
},
"ios": {
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"noHmr": true,
"platform": "ios"
@ -24,6 +30,8 @@
},
"android": {
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"noHmr": true,
"platform": "android"

View File

@ -4,6 +4,10 @@
"sourceRoot": "apps/toolbox/src",
"projectType": "application",
"prefix": "nativescript",
"namedInputs": {
"default": ["{projectRoot}/**/*"],
"production": ["!{projectRoot}/**/*.spec.ts"]
},
"targets": {
"build": {
"executor": "@nativescript/nx:build",
@ -17,6 +21,8 @@
},
"ios": {
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "ios",
"noHmr": true
@ -24,6 +30,8 @@
},
"android": {
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "android",
"noHmr": true

View File

@ -4,6 +4,10 @@
"sourceRoot": "apps/ui/src",
"projectType": "application",
"prefix": "nativescript",
"namedInputs": {
"default": ["{projectRoot}/**/*"],
"production": ["!{projectRoot}/**/*.spec.ts"]
},
"targets": {
"build": {
"executor": "@nativescript/nx:build",
@ -17,6 +21,8 @@
},
"ios": {
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "ios",
"noHmr": true
@ -24,6 +30,8 @@
},
"android": {
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "android",
"noHmr": true

View File

@ -6,13 +6,14 @@
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"runner": "@nrwl/nx-cloud",
"options": {
"useDaemonProcess": false,
"cacheableOperations": ["build", "lint", "test", "e2e"],
"cacheableOperations": ["build", "lint", "test", "ios", "android", "e2e"],
"canTrackAnalytics": false,
"showUsageWarnings": true,
"parallel": 1
"parallel": 1,
"accessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU="
}
}
},

View File

@ -18,11 +18,12 @@
"url": "https://github.com/NativeScript/NativeScript.git"
},
"dependencies": {
"@nrwl/nx-cloud": "^15.0.2",
"nativescript-theme-core": "^1.0.4"
},
"devDependencies": {
"@nativescript/hook": "^2.0.0",
"@nativescript/nx": "~4.0.0",
"@nativescript/nx": "~4.1.0",
"@nrwl/cli": "15.2.1",
"@nrwl/eslint-plugin-nx": "15.2.1",
"@nrwl/jest": "15.2.1",
@ -54,6 +55,7 @@
"module-alias": "^2.2.2",
"nativescript": "~8.3.0",
"nativescript-typedoc-theme": "1.1.0",
"nx": "15.2.1",
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
"parserlib": "^1.1.1",
"prettier": "^2.6.2",
@ -69,8 +71,7 @@
"tslint-to-eslint-config": "^2.13.0",
"typedoc": "^0.22.17",
"typescript": "4.8.4",
"zx": "^7.0.5",
"nx": "15.2.1"
"zx": "^7.0.5"
},
"lint-staged": {
"**/*": [
@ -78,4 +79,3 @@
]
}
}

View File

@ -4,6 +4,10 @@
"sourceRoot": "packages/core",
"projectType": "library",
"generators": {},
"namedInputs": {
"default": ["{projectRoot}/**/*"],
"production": ["!{projectRoot}/**/*.spec.ts"]
},
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
@ -13,6 +17,8 @@
},
"test": {
"executor": "@nrwl/jest:jest",
"inputs": ["default", "^production"],
"outputs": ["dist/out-tsc"],
"options": {
"jestConfig": "packages/core/jest.config.ts",
"passWithNoTests": true,
@ -22,11 +28,11 @@
"ci": {
"ci": true
}
},
"outputs": ["{workspaceRoot}/coverage/packages/core"]
}
},
"build": {
"executor": "nx:run-commands",
"inputs": ["default", "^production"],
"outputs": ["{workspaceRoot}/dist/packages"],
"options": {
"commands": [

View File

@ -11,13 +11,11 @@ const TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
const platform = process.argv[2];
const spawned_process = spawn(
"ns",
"npx",
[
"--path=./apps/automated",
"nx",
"run",
platform,
"--no-hmr",
"--force",
`apps-automated:${platform}`,
// "--log=trace",
"--timeout=600" // 10 minutes, booting avds on CI is very slow...
],