Skip to content

Commit 7226d50

Browse files
authoredJun 12, 2023
chore: Merge select workspace changes from alpha (#5563)
1 parent 8449779 commit 7226d50

File tree

136 files changed

+1432
-1458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1432
-1458
lines changed
 

‎.github/workflows/ci.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: ci
2-
concurrency:
3-
group: publish-${{ github.github.base_ref }}
4-
cancel-in-progress: true
2+
53
on:
64
workflow_dispatch:
75
inputs:
@@ -13,9 +11,15 @@ on:
1311
- 'main'
1412
- 'alpha'
1513
- 'beta'
14+
15+
concurrency:
16+
group: publish-${{ github.github.base_ref }}
17+
cancel-in-progress: true
18+
1619
env:
17-
NX_DAEMON: false
1820
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
21+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
22+
1923
jobs:
2024
test-and-publish:
2125
if: github.repository == 'TanStack/query' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')

‎.github/workflows/pr.yml

+53-42
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,99 @@
11
name: pr
2+
23
on: [pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
7+
cancel-in-progress: true
8+
39
env:
4-
NX_DAEMON: false
10+
NX_CLOUD_DISTRIBUTED_EXECUTION: true
11+
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 3
512
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
13+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
14+
615
jobs:
7-
agent:
8-
name: 'Nx Cloud Agents'
16+
main:
17+
name: Nx Cloud - Main Job
918
runs-on: ubuntu-latest
10-
timeout-minutes: 20
11-
strategy:
12-
matrix:
13-
agent: [1, 2, 3, 4]
1419
steps:
1520
- uses: actions/checkout@v3
1621
with:
1722
fetch-depth: 0
18-
ref: ${{ github.head_ref }}
19-
repository: ${{github.event.pull_request.head.repo.full_name}}
20-
- uses: pnpm/action-setup@v2.2.4
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v2.2.4
2125
with:
2226
version: 8
23-
- uses: actions/setup-node@v3
27+
- name: Setup Node
28+
uses: actions/setup-node@v3
2429
with:
2530
node-version: 16.14.2
2631
cache: 'pnpm'
2732
- name: Install dependencies
2833
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
29-
- name: Start Nx Agent ${{ matrix.agent }}
30-
run: npx nx-cloud start-agent
31-
orchestrator:
32-
name: 'Nx Cloud Orchestrator'
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v3
36-
with:
37-
fetch-depth: 0
38-
ref: ${{ github.head_ref }}
39-
repository: ${{github.event.pull_request.head.repo.full_name}}
40-
- uses: pnpm/action-setup@v2.2.4
41-
with:
42-
version: 8
43-
- uses: actions/setup-node@v3
34+
- name: Get appropriate base and head commits for `nx affected` commands
35+
uses: nrwl/nx-set-shas@v3
4436
with:
45-
node-version: 16.14.2
46-
cache: 'pnpm'
47-
- name: Install dependencies
48-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
49-
- name: Derive appropriate SHAs for base and head for `nx affected` commands
50-
uses: nrwl/nx-set-shas@v2
37+
main-branch-name: 'main'
5138
- run: |
5239
echo "BASE: ${{ env.NX_BASE }}"
5340
echo "HEAD: ${{ env.NX_HEAD }}"
5441
- name: Start CI Orchestrator
5542
run: npx nx-cloud start-ci-run
56-
- name: Run All Checks
43+
- name: Run Tests
5744
uses: nick-fields/retry@v2.8.3
58-
env:
59-
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
6045
with:
6146
timeout_minutes: 5
6247
max_attempts: 3
63-
command: npx nx affected --targets=test:eslint,test:types,test:build,test:lib --base=${{ github.event.pull_request.base.sha }}
48+
command: npx nx affected --targets=test:eslint,test:lib,test:types,test:build
6449
- name: Stop Agents
6550
run: npx nx-cloud stop-all-agents
6651
- name: Upload coverage to Codecov
6752
uses: codecov/codecov-action@v3
53+
agents:
54+
name: Nx Cloud - Agents
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 10
57+
strategy:
58+
matrix:
59+
agent: [1, 2, 3]
60+
steps:
61+
- uses: actions/checkout@v3
62+
with:
63+
fetch-depth: 0
64+
- name: Setup pnpm
65+
uses: pnpm/action-setup@v2.2.4
66+
with:
67+
version: 8
68+
- name: Setup Node
69+
uses: actions/setup-node@v3
70+
with:
71+
node-version: 16.14.2
72+
cache: 'pnpm'
73+
- name: Install dependencies
74+
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
75+
- name: Start Nx Agent ${{ matrix.agent }}
76+
run: npx nx-cloud start-agent
6877
format:
69-
name: 'Format'
78+
name: Format
7079
runs-on: ubuntu-latest
7180
steps:
7281
- uses: actions/checkout@v3
7382
with:
7483
fetch-depth: 0
75-
ref: ${{ github.head_ref }}
76-
repository: ${{github.event.pull_request.head.repo.full_name}}
77-
- uses: pnpm/action-setup@v2.2.4
84+
- name: Setup pnpm
85+
uses: pnpm/action-setup@v2.2.4
7886
with:
7987
version: 8
80-
- uses: actions/setup-node@v3
88+
- name: Setup Node
89+
uses: actions/setup-node@v3
8190
with:
8291
node-version: 16.14.2
8392
cache: 'pnpm'
8493
- name: Install dependencies
8594
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
86-
- run: pnpm run test:format
95+
- name: Run prettier
96+
run: pnpm run test:format
8797
test-react-17:
8898
name: 'Test React 17'
8999
runs-on: ubuntu-latest
@@ -111,4 +121,5 @@ jobs:
111121
max_attempts: 3
112122
command: npx nx affected --targets=test:lib --base=${{ github.event.pull_request.base.sha }}
113123
env:
124+
NX_CLOUD_DISTRIBUTED_EXECUTION: false
114125
REACTJS_VERSION: 17

0 commit comments

Comments
 (0)
Failed to load comments.