From 49635fcf5ad08c30311d09e4db6a1f15e1fde980 Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Thu, 16 May 2024 16:35:44 +0800 Subject: [PATCH] feat: test --- .github/workflow/codecov.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflow/codecov.yml b/.github/workflow/codecov.yml index fde5d59f..c1958da8 100644 --- a/.github/workflow/codecov.yml +++ b/.github/workflow/codecov.yml @@ -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: