From ce250abe543554baac9c187fb9facfdd1b14cb07 Mon Sep 17 00:00:00 2001 From: Zhang Jie Date: Tue, 26 Mar 2024 10:28:14 +0000 Subject: [PATCH] fix code cov --- .github/workflows/unittest.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 07d3275..17b1b74 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -16,6 +16,10 @@ jobs: fail-fast: false matrix: python-version: ["3.11", "3.12"] + os: [ubuntu-latest, macos-latest] + env: + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 @@ -42,8 +46,13 @@ jobs: poetry run flake8 ./src --count --exit-zero - name: Test with pytest run: | - poetry run pytest -v --cov src/pygmssl + poetry run pytest --cov=src/pygmssl --cov-report=xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + env_vars: OS,PYTHON + fail_ci_if_error: true # optional (default = false) + flags: unittests + name: codecov-umbrella # optional + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true # optional (default = false)