Skip to content

feat(ci): add unit tests #2

feat(ci): add unit tests

feat(ci): add unit tests #2

Workflow file for this run

name: Unit Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm test
- name: Run unit tests with coverage
run: pnpm run test:coverage
if: github.event_name == 'pull_request'
- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: github.event_name == 'pull_request'
with:
name: coverage-report
path: coverage/
retention-days: 7