xiaoju-survey/.github/workflow/codecov.yml
2024-05-16 16:35:44 +08:00

34 lines
680 B
YAML

# Unit Test Coverage Report
name: Test Coverage
on:
pull_request:
branches:
- feature/workflow
workflow_dispatch:
jobs:
build:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: cd server && npm install
- name: Run tests and collect coverage
run: cd server && npm run test:cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}