From 1cdd169c06b873ae46938a48f4a1793f73e04bae Mon Sep 17 00:00:00 2001 From: as6325400 Date: Sun, 6 Oct 2024 23:49:51 +0800 Subject: [PATCH] coverage --- .github/workflows/unittest.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index c6663e1..01025d7 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -28,8 +28,14 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install coverage - # 執行測試 - - name: Run tests + - name: Run tests with coverage run: | - python -m unittest discover + coverage run -m unittest discover + coverage xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml # 指定生成的覆蓋率報告文件 \ No newline at end of file