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

pr.yml

34 lines1008 Bytes

1name: pr
2on: [pull_request]
3jobs:
4 test:
5 name: 'Node ${{ matrix.node }}, React ${{ matrix.react }}'
6 runs-on: ubuntu-latest
7 strategy:
8 matrix:
9 node: [16.14.2]
10 react: [17, 18]
11 steps:
12 - uses: actions/checkout@v2
13 - uses: pnpm/action-setup@v2.2.2
14 with:
15 version: 7
16 - uses: actions/setup-node@v3
17 with:
18 node-version: ${{ matrix.node }}
19 cache: 'pnpm'
20 - name: Install dependencies
21 run: pnpm --filter "./packages/**" --filter query --prefer-offline install
22 - run: |
23 pnpm run test:ci
24 pnpm run test:size
25 if: matrix.react == '18'
26 env:
27 REACTJS_VERSION: ${{ matrix.react }}
28 BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
29 - run: pnpm run test:jest
30 if: matrix.react == '17'
31 env:
32 REACTJS_VERSION: ${{ matrix.react }}
33 - name: Upload coverage to Codecov
34 uses: codecov/codecov-action@v2