Skip to content

Commit 4f93b86

Browse files
fix(v4): ensure packages are built during CI (#9227)
* ci(v4): ensure packages are built during CI * Fix prettier
1 parent f3f34a3 commit 4f93b86

File tree

8 files changed

+603
-522
lines changed

8 files changed

+603
-522
lines changed

.github/workflows/ci-v3.yml

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

.github/workflows/ci.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ env:
2424

2525
jobs:
2626
test-and-publish:
27-
if: github.repository == 'TanStack/query'
27+
if: github.repository_owner == 'TanStack'
2828
name: 'Test & Publish'
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: actions/checkout@v3
31+
- name: Checkout
32+
uses: actions/[email protected]
3233
with:
33-
fetch-depth: '0'
34-
- uses: pnpm/[email protected]
35-
with:
36-
version: 8
34+
fetch-depth: 0
35+
- name: Setup pnpm
36+
uses: pnpm/[email protected]
3737
- uses: actions/setup-node@v3
3838
with:
3939
registry-url: https://registry.npmjs.org/
@@ -43,11 +43,7 @@ jobs:
4343
- name: Install dependencies
4444
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
4545
- name: Run Tests
46-
uses: nick-fields/[email protected]
47-
with:
48-
command: pnpm run test:ci --base=${{ github.event.before }}
49-
timeout_minutes: 10
50-
max_attempts: 3
46+
run: pnpm run test:ci --base=${{ github.event.before }}
5147
- name: Publish
5248
run: |
5349
git config --global user.name 'Tanner Linsley'

.github/workflows/pr.yml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: pr
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
45

56
concurrency:
67
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -17,13 +18,12 @@ jobs:
1718
name: Nx Cloud - Main Job
1819
runs-on: ubuntu-latest
1920
steps:
20-
- uses: actions/checkout@v3
21+
- name: Checkout
22+
uses: actions/[email protected]
2123
with:
2224
fetch-depth: 0
2325
- name: Setup pnpm
24-
uses: pnpm/[email protected]
25-
with:
26-
version: 8
26+
uses: pnpm/[email protected]
2727
- name: Setup Node
2828
uses: actions/setup-node@v3
2929
with:
@@ -42,11 +42,7 @@ jobs:
4242
- name: Start CI Orchestrator
4343
run: npx nx-cloud start-ci-run
4444
- name: Run Tests
45-
uses: nick-fields/[email protected]
46-
with:
47-
timeout_minutes: 5
48-
max_attempts: 3
49-
command: npx nx affected --targets=test:eslint,test:lib,test:types,test:build
45+
run: pnpm run test:pr
5046
- name: Stop Agents
5147
run: npx nx-cloud stop-all-agents
5248
- name: Upload coverage to Codecov
@@ -59,13 +55,12 @@ jobs:
5955
matrix:
6056
agent: [1, 2, 3]
6157
steps:
62-
- uses: actions/checkout@v3
58+
- name: Checkout
59+
uses: actions/[email protected]
6360
with:
6461
fetch-depth: 0
6562
- name: Setup pnpm
66-
uses: pnpm/[email protected]
67-
with:
68-
version: 8
63+
uses: pnpm/[email protected]
6964
- name: Setup Node
7065
uses: actions/setup-node@v3
7166
with:
@@ -80,13 +75,12 @@ jobs:
8075
name: Format
8176
runs-on: ubuntu-latest
8277
steps:
83-
- uses: actions/checkout@v3
78+
- name: Checkout
79+
uses: actions/[email protected]
8480
with:
8581
fetch-depth: 0
8682
- name: Setup pnpm
87-
uses: pnpm/[email protected]
88-
with:
89-
version: 8
83+
uses: pnpm/[email protected]
9084
- name: Setup Node
9185
uses: actions/setup-node@v3
9286
with:
@@ -101,14 +95,14 @@ jobs:
10195
name: 'Test React 17'
10296
runs-on: ubuntu-latest
10397
steps:
104-
- uses: actions/checkout@v3
98+
- name: Checkout
99+
uses: actions/[email protected]
105100
with:
106101
fetch-depth: 0
107102
ref: ${{ github.head_ref }}
108103
repository: ${{github.event.pull_request.head.repo.full_name}}
109-
- uses: pnpm/[email protected]
110-
with:
111-
version: 8
104+
- name: Setup pnpm
105+
uses: pnpm/[email protected]
112106
- uses: actions/setup-node@v3
113107
with:
114108
node-version-file: .nvmrc
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

examples/react/optimistic-updates-typescript/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"module": "esnext",
1313
"moduleResolution": "node",
1414
"resolveJsonModule": true,
15-
"isolatedModules": true
15+
"isolatedModules": true,
16+
"incremental": true
1617
},
1718
"include": ["src"],
1819
"exclude": ["node_modules"]

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
1111
"install:csb": "corepack enable && pnpm install --frozen-lockfile",
1212
"test": "pnpm run test:ci",
13-
"test:ci": "nx affected --targets=test:lib,test:types,test:eslint,test:format",
13+
"test:pr": "nx affected --targets=test:lib,test:types,test:eslint,build,test:build --exclude=examples/**",
14+
"test:ci": "nx run-many --targets=test:lib,test:types,test:eslint,build,test:build --exclude=examples/**",
1415
"test:react:17": "nx affected --target=test:lib",
1516
"test:eslint": "nx affected --target=test:eslint",
1617
"test:format": "pnpm run prettier --check",

0 commit comments

Comments
 (0)