feat: test

This commit is contained in:
sudoooooo 2024-05-16 16:35:44 +08:00
parent 3345960351
commit 49635fcf5a

View File

@ -1,19 +1,32 @@
name: Main workflow
on: [push, pull_request]
# Unit Test Coverage Report
name: Test Coverage
on:
pull_request:
branches:
- feature/workflow
workflow_dispatch:
jobs:
codecov:
build:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node 20
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
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: