|
| 1 | +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs |
| 3 | + |
| 4 | +name: Lint and test with coverage all packages |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ "main" ] |
| 9 | + pull_request: |
| 10 | + branches: [ "main", "next", "develop" ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + node-version: [18.x] |
| 20 | + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v3 |
| 25 | + - name: Use Node.js ${{ matrix.node-version }} |
| 26 | + uses: actions/setup-node@v3 |
| 27 | + with: |
| 28 | + node-version: ${{ matrix.node-version }} |
| 29 | + cache: 'yarn' |
| 30 | + - name: Install dependencies |
| 31 | + run: yarn install --frozen-lockfile |
| 32 | + - name: Lint packages |
| 33 | + run: yarn lint |
| 34 | + - name: Test packages with coverage |
| 35 | + run: yarn test:coverage |
| 36 | + |
| 37 | + - name: Upload use-long-press coverage reports to Codecov |
| 38 | + uses: codecov/codecov-action@v3 |
| 39 | + with: |
| 40 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 41 | + directory: ./coverage/packages/use-long-press |
| 42 | + flags: hooks,use-long-press |
| 43 | + |
| 44 | + - name: Upload use-double-tap coverage reports to Codecov |
| 45 | + uses: codecov/codecov-action@v3 |
| 46 | + with: |
| 47 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 48 | + directory: ./coverage/packages/use-double-tap |
| 49 | + flags: hooks,use-double-tap |
| 50 | + |
0 commit comments