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