Skip to content

fix(v4): ensure packages are built during CI #9227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .github/workflows/ci-v3.yml

This file was deleted.

18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ env:

jobs:
test-and-publish:
if: github.repository == 'TanStack/query'
if: github.repository_owner == 'TanStack'
name: 'Test & Publish'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: '0'
- uses: pnpm/[email protected]
with:
version: 8
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/[email protected]
- uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
Expand All @@ -43,11 +43,7 @@ jobs:
- name: Install dependencies
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
- name: Run Tests
uses: nick-fields/[email protected]
with:
command: pnpm run test:ci --base=${{ github.event.before }}
timeout_minutes: 10
max_attempts: 3
run: pnpm run test:ci --base=${{ github.event.before }}
- name: Publish
run: |
git config --global user.name 'Tanner Linsley'
Expand Down
38 changes: 16 additions & 22 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: pr

on: [pull_request]
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -17,13 +18,12 @@ jobs:
name: Nx Cloud - Main Job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8
uses: pnpm/[email protected]
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -42,11 +42,7 @@ jobs:
- name: Start CI Orchestrator
run: npx nx-cloud start-ci-run
- name: Run Tests
uses: nick-fields/[email protected]
with:
timeout_minutes: 5
max_attempts: 3
command: npx nx affected --targets=test:eslint,test:lib,test:types,test:build
run: pnpm run test:pr
- name: Stop Agents
run: npx nx-cloud stop-all-agents
- name: Upload coverage to Codecov
Expand All @@ -59,13 +55,12 @@ jobs:
matrix:
agent: [1, 2, 3]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8
uses: pnpm/[email protected]
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -80,13 +75,12 @@ jobs:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8
uses: pnpm/[email protected]
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -101,14 +95,14 @@ jobs:
name: 'Test React 17'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: pnpm/[email protected]
with:
version: 8
- name: Setup pnpm
uses: pnpm/[email protected]
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
Expand Down
5 changes: 4 additions & 1 deletion examples/react/optimistic-updates-typescript/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
3 changes: 2 additions & 1 deletion examples/react/optimistic-updates-typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true
"isolatedModules": true,
"incremental": true
},
"include": ["src"],
"exclude": ["node_modules"]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
"install:csb": "corepack enable && pnpm install --frozen-lockfile",
"test": "pnpm run test:ci",
"test:ci": "nx affected --targets=test:lib,test:types,test:eslint,test:format",
"test:pr": "nx affected --targets=test:lib,test:types,test:eslint,build,test:build --exclude=examples/**",
"test:ci": "nx run-many --targets=test:lib,test:types,test:eslint,build,test:build --exclude=examples/**",
"test:react:17": "nx affected --target=test:lib",
"test:eslint": "nx affected --target=test:eslint",
"test:format": "pnpm run prettier --check",
Expand Down
Loading
Loading