Skip to content

[stable4.4] chore: update workflows from templates #4966

[stable4.4] chore: update workflows from templates

[stable4.4] chore: update workflows from templates #4966

Workflow file for this run

name: JS Tests
on: pull_request
jobs:
jest:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18]
npm-version: [8]
include:
- node-version: 14
npm-version: 7
name: node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up npm ${{ matrix.npm-version }}
run: npm i -g npm@${{ matrix.npm-version }}
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage/coverage-final.json
flags: javascript
fail_ci_if_error: true
summary:
runs-on: ubuntu-latest
needs:
- jest
if: always()
name: npm-test-summary
steps:
- name: Jest status
run: if ${{ needs.jest.result != 'success' && needs.jest.result != 'skipped' }}; then exit 1; fi