Skip to content

Commit

Permalink
coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aewallin committed Nov 26, 2023
1 parent a7cca19 commit 866efd0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Pytest Coverage, Coveralls

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

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
- name: Test with coverage
run: |
coverage run --source allantools setup.py test
coverage html
coverage report
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]

6 changes: 3 additions & 3 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# works at least on Ubuntu 16.04LTS
# AW2016-11-13

python-coverage run --source allantools setup.py test
python-coverage html
python-coverage report
python3-coverage run --source allantools setup.py test
python3-coverage html
python3-coverage report
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[pytest]
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
testpaths =
tests

0 comments on commit 866efd0

Please sign in to comment.