Open History to see the last commit
1name: react-query tests
2β
3on:
4 push:
5 branches:
6 - 'v3'
7env:
8 NX_DAEMON: false
9 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
10jobs:
11 test:
12 name: 'Node ${{ matrix.node }}, React ${{ matrix.react }}'
13 runs-on: ubuntu-latest
14 strategy:
15 matrix:
16 node: [14, 16]
17 react: [17, 18]
18 steps:
19 - uses: actions/checkout@v2
20 - uses: actions/setup-node@v2
21 with:
22 node-version: ${{ matrix.node }}
23 - name: Install dependencies
24 uses: bahmutov/npm-install@v1
25 - run: yarn test:ci
26 env:
27 REACTJS_VERSION: ${{ matrix.react }}
28 - run: yarn test:size
29 if: matrix.node == '16' && matrix.react == '18'
30 env:
31 BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
32 - name: Upload coverage to Codecov
33 uses: codecov/codecov-action@v2
34β
35 publish-module:
36 name: 'Publish Module to NPM'
37 needs: test
38 # publish only when merged in master on original repo, not on PR
39 if: github.repository == 'TanStack/query' && github.ref == 'refs/heads/v3'
40 runs-on: ubuntu-latest
41 steps:
42 - uses: actions/checkout@v2
43 - uses: actions/setup-node@v2
44 with:
45 node-version: 14
46 registry-url: https://registry.npmjs.org/
47 - name: Install dependencies
48 uses: bahmutov/npm-install@v1
49 - run: yarn build
50 - run: npx semantic-release@17
51 env:
52 NODE_AUTH_TOKEN: ${{secrets.npm_token}}
53 GH_TOKEN: ${{secrets.GH_TOKEN}}