Skip to content

Commit 61a83a6

Browse files
authored
feat(nx-cloud): organize workspace caching with improved input/outputs (#10734)
1 parent 2ad5daf commit 61a83a6

27 files changed

+2277
-148
lines changed

.github/workflows/apps_automated_android.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
workflow_dispatch:
1010

11+
env:
12+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1316
cancel-in-progress: true
@@ -19,10 +22,16 @@ jobs:
1922
steps:
2023
- uses: actions/checkout@v4
2124

25+
2226
- uses: actions/setup-node@v4
2327
with:
2428
node-version: 23.5.0
2529

30+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
31+
uses: nrwl/nx-set-shas@v4
32+
with:
33+
main-branch-name: 'main'
34+
2635
- uses: actions/setup-java@v4
2736
with:
2837
distribution: 'temurin'
@@ -36,7 +45,7 @@ jobs:
3645
- name: Install NativeScript
3746
run: |
3847
python3 -m pip install --upgrade pip six
39-
npm i -g nativescript --ignore-scripts --legacy-peer-deps
48+
npm i -g nativescript --ignore-scripts
4049
ns usage-reporting disable
4150
ns error-reporting disable
4251
@@ -57,4 +66,4 @@ jobs:
5766
with:
5867
api-level: 34
5968
arch: x86_64
60-
script: node tools/scripts/run-automated.js android
69+
script: npx nx test apps-automated -c=android

.github/workflows/apps_automated_ios.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
workflow_dispatch:
1010

11+
env:
12+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1316
cancel-in-progress: true
@@ -27,9 +30,14 @@ jobs:
2730
with:
2831
node-version: 23.5.0
2932

33+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
34+
uses: nrwl/nx-set-shas@v4
35+
with:
36+
main-branch-name: 'main'
37+
3038
- name: Install NativeScript
3139
run: |
32-
npm i -g nativescript --ignore-scripts --legacy-peer-deps
40+
npm i -g nativescript --ignore-scripts
3341
ns usage-reporting disable
3442
ns error-reporting disable
3543
# ns doctor
@@ -47,4 +55,4 @@ jobs:
4755
os_version: '17.5'
4856

4957
- name: Run tests on iOS Simulator
50-
run: node tools/scripts/run-automated.js ios
58+
run: npx nx test apps-automated -c=ios

.github/workflows/npm_release_core.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
NPM_TAG: 'next'
12+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
1213

1314
jobs:
1415
release:
@@ -20,6 +21,11 @@ jobs:
2021
- name: Setup
2122
run: npm run setup
2223

24+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
25+
uses: nrwl/nx-set-shas@v4
26+
with:
27+
main-branch-name: 'main'
28+
2329
- name: Generate Version
2430
working-directory: packages/core
2531
run: |

.github/workflows/npm_release_tns_core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v2
1919

2020
- name: Setup
21-
run: npm install --legacy-peer-deps
21+
run: npm install
2222

2323
- name: Generate Version
2424
run: |

.github/workflows/npm_release_webpack.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v2
1818

1919
- name: Setup
20-
run: npm install --legacy-peer-deps
20+
run: npm install
2121

2222
- name: Generate Version
2323
working-directory: packages/webpack
@@ -32,10 +32,10 @@ jobs:
3232
run: npx nx run webpack:build
3333

3434
- name: Publish @nativescript/webpack
35-
working-directory: dist/packages
35+
working-directory: dist/packages/webpack5
3636
env:
3737
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
3838
run: |
3939
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ../../.npmrc
4040
echo "Publishing @nativescript/webpack@$NPM_VERSION to NPM with tag $NPM_TAG..."
41-
npm publish nativescript-webpack.tgz --tag $NPM_TAG --dry-run
41+
npm publish --tag $NPM_TAG --dry-run

apps/automated/.npmrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/automated/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@nativescript/android": "~8.8.0",
1515
"@nativescript/ios": "~8.8.0",
1616
"@nativescript/visionos": "~8.8.0",
17-
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
17+
"@nativescript/webpack": "file:../../dist/packages/webpack5",
1818
"circular-dependency-plugin": "^5.2.2",
1919
"typescript": "~5.6.0"
2020
},

apps/automated/project.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@
1111
"targets": {
1212
"build": {
1313
"executor": "@nativescript/nx:build",
14+
"inputs": ["default", "^production"],
1415
"options": {
1516
"noHmr": true,
1617
"production": true,
1718
"uglify": true,
1819
"release": true,
1920
"forDevice": true
2021
},
21-
"configurations": {}
22+
"configurations": {},
23+
"dependsOn": ["^build"]
2224
},
2325
"debug": {
2426
"executor": "@nativescript/nx:debug",
27+
"inputs": ["default", "^production"],
2528
"options": {
2629
"noHmr": true,
2730
"debug": false,
@@ -30,10 +33,12 @@
3033
"forDevice": false,
3134
"prepare": false
3235
},
33-
"configurations": {}
36+
"configurations": {},
37+
"dependsOn": ["^build"]
3438
},
3539
"prepare": {
3640
"executor": "@nativescript/nx:prepare",
41+
"inputs": ["default", "^production"],
3742
"options": {
3843
"noHmr": true,
3944
"production": true,
@@ -42,7 +47,21 @@
4247
"forDevice": true,
4348
"prepare": true
4449
},
45-
"configurations": {}
50+
"configurations": {},
51+
"dependsOn": ["^build"]
52+
},
53+
"test": {
54+
"executor": "nx:run-commands",
55+
"defaultConfiguration": "ios",
56+
"configurations": {
57+
"ios": {
58+
"commands": ["node tools/scripts/run-automated.js ios"]
59+
},
60+
"android": {
61+
"commands": ["node tools/scripts/run-automated.js android"]
62+
}
63+
},
64+
"dependsOn": ["^build"]
4665
},
4766
"clean": {
4867
"executor": "@nativescript/nx:clean",
@@ -54,5 +73,6 @@
5473
"lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"]
5574
}
5675
}
57-
}
76+
},
77+
"implicitDependencies": ["webpack5"]
5878
}

apps/toolbox/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/toolbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@nativescript/android": "~8.8.0",
1616
"@nativescript/ios": "~8.8.0",
1717
"@nativescript/visionos": "~8.8.0",
18-
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
18+
"@nativescript/webpack": "file:../../dist/packages/webpack5",
1919
"typescript": "~5.6.0"
2020
}
2121
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy