Skip to content

Commit

Permalink
change code-cov pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
j-z10 committed Apr 4, 2024
1 parent 4364f40 commit 84ba651
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

0 comments on commit 84ba651

Please sign in to comment.