summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-06 07:54:16 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-06 12:27:19 -0500
commitf324e4b246f672ae1c1396da585b1519fe3756fc (patch)
tree529ec6031a0546b10cf6aa57c43cd48c65c2f057
parent2e4b2977c78e254797d07c39e933fd535d4b0cec (diff)
downloadpython-coveragepy-git-f324e4b246f672ae1c1396da585b1519fe3756fc.tar.gz
build: improved combined coverage action
- codecov wants more history. - make a downloadable HTML report.
-rw-r--r--.github/workflows/coverage.yml32
-rw-r--r--.github/workflows/testsuite.yml5
2 files changed, 30 insertions, 7 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index ad5a21cf..c96ce2d4 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -15,16 +15,24 @@ defaults:
jobs:
coverage:
- name: "Python ${{ matrix.python-version }}"
- runs-on: ubuntu-latest
+ name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
+ runs-on: "${{ matrix.os }}"
strategy:
matrix:
+ os:
+ - ubuntu-latest
+ - macos-latest
+ - windows-latest
python-version:
- "2.7"
- "3.5"
- "3.9"
- "pypy3"
+ exclude:
+ # Windows PyPy doesn't seem to work?
+ - os: windows-latest
+ python-version: "pypy3"
fail-fast: false
steps:
@@ -36,6 +44,11 @@ jobs:
with:
python-version: "${{ matrix.python-version }}"
+ - name: "Install Visual C++ if needed"
+ if: runner.os == 'Windows' && matrix.python-version == '2.7'
+ run: |
+ choco install vcpython27 -f -y
+
- name: "Install dependencies"
run: |
set -xe
@@ -51,13 +64,13 @@ jobs:
set -xe
python -m tox
python -m igor combine_html
- mv .metacov .coverage.${{ matrix.python-version }}
+ mv .metacov .metacov.${{ matrix.python-version }}.${{ matrix.os }}
- name: "Upload coverage data"
uses: actions/upload-artifact@v2
with:
name: metacov
- path: .coverage.*
+ path: .metacov.*
combine:
name: "Combine coverage data"
@@ -67,6 +80,8 @@ jobs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v2"
+ with:
+ fetch-depth: "0"
- name: "Set up Python"
uses: "actions/setup-python@v2"
@@ -90,10 +105,15 @@ jobs:
- name: "Combine and report"
run: |
set -xe
- coverage combine
- coverage xml
+ python -m igor combine_html
- name: "Upload to codecov"
uses: codecov/codecov-action@v1
with:
file: coverage.xml
+
+ - name: "Upload HTML report"
+ uses: actions/upload-artifact@v2
+ with:
+ name: html_report
+ path: htmlcov
diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml
index 59f5380b..25fcd73d 100644
--- a/.github/workflows/testsuite.yml
+++ b/.github/workflows/testsuite.yml
@@ -20,7 +20,10 @@ jobs:
strategy:
matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
+ os:
+ - ubuntu-latest
+ - macos-latest
+ - windows-latest
python-version:
- "2.7"
- "3.5"