Skip to content

Commit

Permalink
Coverage action
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 5, 2020
1 parent c77977f commit 104d51e
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt

name: "Coverage"

on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
coverage:
name: "Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- "2.7"
- "3.5"
- "3.9"
- "pypy3"
fail-fast: false

steps:
- name: "Check out the repo"
uses: "actions/checkout@v2"

- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"

- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install -r requirements/ci.pip
python -m pip install -c requirements/pins.pip tox-gh-actions
- name: "Run tox coverage for ${{ matrix.python-version }}"
env:
COVERAGE_COVERAGE: "yes"
run: |
python -m tox
python -m igor combine_html
- name: "Upload to codecov"
uses: codecov/codecov-action@v1
with:
file: coverage.xml

0 comments on commit 104d51e

Please sign in to comment.