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-07 17:24:44 -0500
commita9b259732e6cc96afd29c902670a0d4c9177714e (patch)
tree4fecc470856e1e903c5a9c6f25f517fe6032f8ae
parent2e4b2977c78e254797d07c39e933fd535d4b0cec (diff)
downloadpython-coveragepy-git-a9b259732e6cc96afd29c902670a0d4c9177714e.tar.gz
build: improved combined coverage action
- codecov wants more history. - make a downloadable HTML report.
-rw-r--r--.github/workflows/coverage.yml36
-rw-r--r--.github/workflows/testsuite.yml5
2 files changed, 33 insertions, 8 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index ad5a21cf..9629463e 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -6,7 +6,9 @@ name: "Coverage"
on:
push:
branches: ["master"]
- pull_request:
+ # as currently structured, this adds too many jobs (checks?), so don't run it
+ # on pull requests yet.
+ #pull_request:
workflow_dispatch:
defaults:
@@ -15,16 +17,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 +46,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 +66,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 +82,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 +107,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"