Skip to content

Commit

Permalink
chore: Update Nx caching inputs (#5242)
Browse files Browse the repository at this point in the history
* Update nx cache inputs

* Only run CI on original repo
  • Loading branch information
lachlancollins committed Dec 30, 2023
1 parent f4356c0 commit aec4d3c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -16,6 +16,7 @@ concurrency:
jobs:
test-and-publish:
name: Test & Publish
if: github.repository == 'TanStack/table'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +32,7 @@ jobs:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run Tests
run: pnpm run test:ci
- name: Publish
Expand Down
25 changes: 21 additions & 4 deletions nx.json
Expand Up @@ -11,23 +11,40 @@
},
"parallel": 5,
"namedInputs": {
"packageSources": [
"{workspaceRoot}/packages/**/src/**/*.ts",
"{workspaceRoot}/packages/**/tsconfig.json"
"sharedGlobals": [
"{workspaceRoot}/.nvmrc",
"{workspaceRoot}/package.json",
"{workspaceRoot}/scripts/getRollupConfig.js",
"{workspaceRoot}/tsconfig.json"
],
"buildDeps": ["{projectRoot}/**/*", "!{projectRoot}/__tests__/**/*"]
"default": [
"sharedGlobals",
"{projectRoot}/**/*",
"!{projectRoot}/**/*.md"
],
"public": [
"default",
"{projectRoot}/build",
"{projectRoot}/dist",
"!{projectRoot}/.eslintrc.cjs",
"!{projectRoot}/tsconfig.eslint.json"
]
},
"targetDefaults": {
"test:lib": {
"dependsOn": ["^build"],
"inputs": ["default", "^public"],
"outputs": ["{projectRoot}/coverage"],
"cache": true
},
"test:types": {
"dependsOn": ["^build"],
"inputs": ["default", "^public"],
"cache": true
},
"build": {
"dependsOn": ["^build"],
"inputs": ["default", "^public"],
"outputs": ["{projectRoot}/build", "{projectRoot}/dist"],
"cache": true
}
Expand Down

0 comments on commit aec4d3c

Please sign in to comment.