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

ci-v3.yml

50 lines1.4 KB

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