Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

pr.yml

59 lines1.6 KB

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​
18jobs:
19 test:
20 name: Test
21 runs-on: ubuntu-latest
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v4.1.7
25 with:
26 fetch-depth: 0
27 - name: Start Nx Agents
28 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
29 - name: Setup Tools
30 uses: tanstack/config/.github/setup@main
31 - name: Get base and head commits for `nx affected`
32 uses: nrwl/nx-set-shas@v4.0.6
33 with:
34 main-branch-name: main
35 - name: Run Checks
36 run: pnpm run test:pr --parallel=3
37 - name: Stop Nx Agents
38 if: ${{ always() }}
39 run: npx nx-cloud stop-all-agents
40 - name: Upload coverage to Codecov
41 uses: codecov/codecov-action@v4.5.0
42 with:
43 directory: packages
44 env:
45 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
46 preview:
47 name: Preview
48 runs-on: ubuntu-latest
49 steps:
50 - name: Checkout
51 uses: actions/checkout@v4.1.7
52 with:
53 fetch-depth: 0
54 - name: Setup Tools
55 uses: tanstack/config/.github/setup@main
56 - name: Build Packages
57 run: pnpm run build:all
58 - name: Publish Previews
59 run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'