From 84ba6511c75ad0b54cdafd191db2568c091ce8ea Mon Sep 17 00:00:00 2001 From: Zhang Jie Date: Thu, 4 Apr 2024 05:47:04 +0000 Subject: [PATCH] change code-cov pipeline --- .github/workflows/unittest.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index d4350c8..4990687 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: python-version: ["3.12"] - gmssl-version: ["v3.1.1", "v3.1.0"] + gmssl-version: ["v3.1.1"] os: [ubuntu-latest, macos-latest, windows-latest] steps: @@ -75,13 +75,27 @@ jobs: poetry install --sync --without dev - name: Test with pytest run: | - poetry run pytest --cov=src --cov-report=xml + poetry run pytest --cov=src --cov-report=xml:python${{ matrix.python-version }}-Gm${{ matrix.gmssl-version }}-${{ matrix.os }}-coverage.xml + - name: Upload coverage reports + uses: actions/upload-artifact@v4 + with: + name: coverage-file-python${{ matrix.python-version }}-Gm${{ matrix.gmssl-version }}-${{ matrix.os }} + path: python${{ matrix.python-version }}-Gm${{ matrix.gmssl-version }}-${{ matrix.os }}-coverage.xml + upload-coverage: + needs: test + runs-on: ubuntu-latest + steps: + - name: Download coverage reports + uses: actions/download-artifact@v4 + with: + pattern: coverage-file-* + path: ./ + merge-multiple: true - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: - env_vars: OS,PYTHON fail_ci_if_error: true # optional (default = false) flags: unittests - name: codecov-umbrella-python${{ matrix.python-version }}-Gm-${{ matrix.gmssl-version }}-${{ matrix.os }} # optional + name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} verbose: true # optional (default = false)