Open History to see the last commit
1name: pr
2β
3on:
4 pull_request:
5 push:
6 branches: ['svelte-5-adapter']
7β
8concurrency:
9 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
10 cancel-in-progress: true
11β
12env:
13 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
14β
15permissions:
16 contents: read
17 pull-requests: write
18β
19jobs:
20 test:
21 name: Test
22 runs-on: ubuntu-latest
23 steps:
24 - name: Checkout
25 uses: actions/checkout@v4.2.2
26 with:
27 fetch-depth: 0
28 - name: Start Nx Agents
29 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
30 - name: Setup Tools
31 uses: tanstack/config/.github/setup@main
32 - name: Get base and head commits for `nx affected`
33 uses: nrwl/nx-set-shas@v4.1.2
34 with:
35 main-branch-name: main
36 - name: Run Checks
37 run: pnpm run test:pr --parallel=3
38 - name: Verify Links
39 run: pnpm run verify-links
40 - name: Stop Nx Agents
41 if: ${{ always() }}
42 run: npx nx-cloud stop-all-agents
43 - name: Upload coverage to Codecov
44 uses: codecov/codecov-action@v4.6.0
45 with:
46 directory: packages
47 env:
48 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
49 preview:
50 name: Preview
51 runs-on: ubuntu-latest
52 steps:
53 - name: Checkout
54 uses: actions/checkout@v4.2.2
55 with:
56 fetch-depth: 0
57 - name: Setup Tools
58 uses: tanstack/config/.github/setup@main
59 - name: Build Packages
60 run: pnpm run build:all
61 - name: Publish Previews
62 run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
63 - name: Determine commit SHA
64 id: determine-sha
65 run: |
66 echo "COMMIT_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
67 - name: Preview Bundle Size
68 uses: marocchino/sticky-pull-request-comment@a071bc9e79df3f13d7cd94d06ab2ef1ec959e9fa
69 with:
70 message: |
71 Sizes for commit ${{ env.COMMIT_SHA }}:
72 | Branch | Bundle Size |
73 |--------|--------|
74 | Main | [](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
75 | This PR | [](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
76 continue-on-error: true