Skip to content

Commit

Permalink
Add coveralls reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
blag committed Nov 27, 2021
1 parent 6f4cd89 commit dad17ca
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
pull_request:
branches:
- develop
- master

jobs:
Expand Down Expand Up @@ -35,18 +36,28 @@ jobs:
- name: Install dependencies
run: |
pip install Django==${{ matrix.django }} django-ipware
pip install pytest pytest-cov pytest-django pytest-flake8 pytest-pythonpath
pip install coveralls pytest pytest-cov pytest-django pytest-flake8 pytest-pythonpath
- name: Run tests
run: |
py.test tests/ --cov=admin_honeypot --cov-config=.coveragerc --cov-report=term-missing --flake8 admin_honeypot
- name: ls
# https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
- name: Report coverage results to Coveralls
run: |
ls -R
# - name: Upload coverage results to Codecov
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# directory: ./.coverage
# name: codecov-umbrella
# path_to_write_report: ./.coverage/codecov_report.txt
# verbose: true
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-python${{ matrix.python }}-django${{ matrix.django }}
COVERALLS_PARALLEL: true

# https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
finish-coverage:
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finish Coveralls reporting
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit dad17ca

Please sign in to comment.