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