diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2020-12-03 19:43:27 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2020-12-03 22:10:21 -0500 |
commit | 2d885b16eaef877621d24c3293a62d60cb7ce865 (patch) | |
tree | d914b71b1d35aa016c764bdc0149557eb2c98eae | |
parent | c77977f316250fbfa4387ca9b3d5839800675166 (diff) | |
download | python-coveragepy-git-nedbat/coverage-action.tar.gz |
Coverage actionnedbat/coverage-action
-rw-r--r-- | .github/workflows/coverage.yml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..8ca41c20 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,61 @@ +# 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: "Coverage on Python ${{ matrix.python-version }}" + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: + - "2.7" + - "3.5" + - "3.9" + 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 for ${{ matrix.python-version }}" + env: + COVERAGE_COVERAGE: "yes" + run: | + set -xe + python -m tox + ls -al .*cov* + python -m igor combine_html + ls -al .*cov* + python -m coverage xml + ls -al .*cov* + + - name: "Upload to codecov" + uses: codecov/codecov-action@v1 + with: + file: coverage.xml |