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 # Unit Test Coverage Report
on: [push, pull_request] name: Test Coverage
on:
pull_request:
branches:
- feature/workflow
workflow_dispatch:
jobs: jobs:
codecov: build:
name: Coverage
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Node 20
- name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 18
- name: Install dependencies - name: Install dependencies
run: cd server && npm install run: cd server && npm install
- name: Run tests and collect coverage - name: Run tests and collect coverage
run: cd server && npm run test:cov run: cd server && npm run test:cov
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta uses: codecov/codecov-action@v4-beta
env: env: