diff options
| author | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2022-10-19 19:56:17 +0200 |
|---|---|---|
| committer | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2022-10-20 01:44:04 +0200 |
| commit | bdf187d077eb5ab3208f991ff7b2917b1e674575 (patch) | |
| tree | 199ecf9c6b6babab37b13f792d35b9a0c4610ad4 /.github/workflows | |
| parent | f07a248e1e58a76eac5069d8c07bdf81e981587d (diff) | |
| download | python-setuptools-git-bdf187d077eb5ab3208f991ff7b2917b1e674575.tar.gz | |
Report coverage from Cygwin jobs
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/main.yml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8892a6cd..5db343d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,11 +105,44 @@ jobs: python${{ matrix.python }}-tox, gcc-core, git, + - name: Record the currently selected Python version + id: python-install + # NOTE: This roughly emulates what `actions/setup-python@v4` provides + # NOTE: except the action gets the version from the installation path + # NOTE: on disk and we get it from runtime. + run: >- + python -c + 'import platform; print("python-version=" + platform.python_version())' + >> ${GITHUB_OUTPUT} + shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0} - name: Run tests shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0} run: | git config --global --add safe.directory "$(cygpath -u "$GITHUB_WORKSPACE")" # workaround for #3408 tox + - name: Create coverage report + if: hashFiles('.coverage') != '' # Rudimentary `file.exists()` + run: >- + python -m pip install coverage + && + python -m coverage xml --ignore-errors + shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0} + - name: Publish coverage + if: hashFiles('coverage.xml') != '' # Rudimentary `file.exists()` + uses: codecov/codecov-action@v3 + with: + flags: >- # Mark which lines are covered by which envs + CI-GHA, + ${{ github.job }}, + OS-${{ + runner.os + }}, + VM-${{ + matrix.platform + }}, + Py-${{ + steps.python-install.outputs.python-version + }} integration-test: needs: test |
