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