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 apps/**/*/webpack.*.js
*.tgz *.tgz
.npmrc .npmrc
**/**/*.log
# System Files # System Files
.DS_Store .DS_Store

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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