Skip to content

Commit aec4d3c

Browse files
authoredDec 30, 2023
chore: Update Nx caching inputs (#5242)
* Update nx cache inputs * Only run CI on original repo
1 parent f4356c0 commit aec4d3c

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed
 

‎.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ concurrency:
1616
jobs:
1717
test-and-publish:
1818
name: Test & Publish
19+
if: github.repository == 'TanStack/table'
1920
runs-on: ubuntu-latest
2021
steps:
2122
- uses: actions/checkout@v4
@@ -31,7 +32,7 @@ jobs:
3132
node-version-file: .nvmrc
3233
cache: pnpm
3334
- name: Install dependencies
34-
run: pnpm install --frozen-lockfile
35+
run: pnpm install --frozen-lockfile --prefer-offline
3536
- name: Run Tests
3637
run: pnpm run test:ci
3738
- name: Publish

‎nx.json

+21-4
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,40 @@
1111
},
1212
"parallel": 5,
1313
"namedInputs": {
14-
"packageSources": [
15-
"{workspaceRoot}/packages/**/src/**/*.ts",
16-
"{workspaceRoot}/packages/**/tsconfig.json"
14+
"sharedGlobals": [
15+
"{workspaceRoot}/.nvmrc",
16+
"{workspaceRoot}/package.json",
17+
"{workspaceRoot}/scripts/getRollupConfig.js",
18+
"{workspaceRoot}/tsconfig.json"
1719
],
18-
"buildDeps": ["{projectRoot}/**/*", "!{projectRoot}/__tests__/**/*"]
20+
"default": [
21+
"sharedGlobals",
22+
"{projectRoot}/**/*",
23+
"!{projectRoot}/**/*.md"
24+
],
25+
"public": [
26+
"default",
27+
"{projectRoot}/build",
28+
"{projectRoot}/dist",
29+
"!{projectRoot}/.eslintrc.cjs",
30+
"!{projectRoot}/tsconfig.eslint.json"
31+
]
1932
},
2033
"targetDefaults": {
2134
"test:lib": {
2235
"dependsOn": ["^build"],
36+
"inputs": ["default", "^public"],
37+
"outputs": ["{projectRoot}/coverage"],
2338
"cache": true
2439
},
2540
"test:types": {
2641
"dependsOn": ["^build"],
42+
"inputs": ["default", "^public"],
2743
"cache": true
2844
},
2945
"build": {
3046
"dependsOn": ["^build"],
47+
"inputs": ["default", "^public"],
3148
"outputs": ["{projectRoot}/build", "{projectRoot}/dist"],
3249
"cache": true
3350
}

0 commit comments

Comments
 (0)
Please sign in to comment.