Skip to content

Commit

Permalink
Publish coverage on coveralls in gh workflow (WIP)
Browse files Browse the repository at this point in the history
Does not work yet!

TODO:
Troubleshoot
- Official coveralls action does not seem to work well for Python
  coverallsapp/github-action#4
  coverallsapp/github-action#30
- Inofficial coveralls action seems to correctly talk to the API
  but has issues finding the coverage data in the tests folder,
  or rather the corresponding code.
  https://github.com/AndreMiras/coveralls-python-action
- Official coveralls cli tool (see travis) triggers 500 on coveralls.io
  • Loading branch information
lukpueh committed Dec 16, 2020
1 parent a13b8dd commit df73242
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 13 deletions.
50 changes: 37 additions & 13 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 @@ -53,7 +55,29 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install tox coveralls
- name: Run tox
run: tox -e ${{ matrix.toxenv }}
run: |
tox -e ${{ matrix.toxenv }}
cat tests/.coverage
pwd
# - name: Publish coverage
# if: matrix.toxenv == 'py'
# uses: AndreMiras/coveralls-python-action@v20201129
# with:
# flag-name: ${{ runner.os }} / Python ${{ matrix.python-version }}
# parallel: true
# debug: true
# base-path: '.'

# finish:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Publish coverage (fin)
# uses: AndreMiras/coveralls-python-action@v20201129
# with:
# parallel-finished: true
# debug: true
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 df73242

Please sign in to comment.