Skip to content

Commit

Permalink
Publish coverage on coveralls in gh workflow (WIP)
Browse files Browse the repository at this point in the history
TODO:
Needs more troubleshooting:
- Official coveralls action does not seem to work well for Python
coverallsapp/github-action#4
coverallsapp/github-action#30
- Official coveralls cli triggers 500 on coveralls.io
- Inofficial coveralls action seems to correctly talk to the API
  but has issues finding the coverage data in the tests folder,
  or the corresponding code.
  https://github.com/AndreMiras/coveralls-python-action
  • Loading branch information
lukpueh committed Dec 15, 2020
1 parent a13b8dd commit fcc1cd0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
43 changes: 32 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ jobs:
# Run regular TUF tests on each OS/Python combination, plus special tests
# (sslib master) and linters on Linux/Python3.x only.
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest, windows-latest]
# python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
python-version: [3.9]
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
toxenv: [py]
include:
- python-version: 3.x
os: ubuntu-latest
toxenv: with-sslib-master
experimental: true
# TODO: Change to 3.x once pylint fully supports Python 3.9
- python-version: 3.8
os: ubuntu-latest
toxenv: lint
# include:
# - python-version: 3.x
# os: ubuntu-latest
# toxenv: with-sslib-master
# experimental: true
# # TODO: Change to 3.x once pylint fully supports Python 3.9
# - python-version: 3.8
# os: ubuntu-latest
# toxenv: lint

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -57,3 +59,22 @@ jobs:
- name: Run tox
run: tox -e ${{ matrix.toxenv }}

- name: Publish coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
COVERALLS_PARALLEL: 'true'
COVERALLS_FLAG_NAME: ${{ runner.os }} / Python ${{ matrix.python-version }}
run: |
coveralls --verbose
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Publish coverage (fin)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
run: |
coveralls --finish --verbose
1 change: 1 addition & 0 deletions tests/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[run]
branch = True
relative_files = True

omit =
# Command-line scripts.
Expand Down

0 comments on commit fcc1cd0

Please sign in to comment.