Skip to content

Merge pull request #38 from seqeralabs/ci/switch-pre-commit-to-prek #37

Merge pull request #38 from seqeralabs/ci/switch-pre-commit-to-prek

Merge pull request #38 from seqeralabs/ci/switch-pre-commit-to-prek #37

Workflow file for this run

name: "Tests"
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: "Unit Tests"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Run tests with coverage
if: matrix.node-version == '20.x'
run: npm run test:ci
- name: Upload coverage to Codecov
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}