Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
89 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[run] | ||
source = findimports | ||
branch = False | ||
plugins = | ||
coverage_python_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 5 * * 6" # 5:00 UTC every Saturday | ||
|
||
jobs: | ||
build: | ||
name: Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: | ||
- "2.7" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "pypy2" | ||
- "pypy3" | ||
|
||
steps: | ||
- name: Git clone | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
|
||
- name: Pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U setuptools wheel | ||
python -m pip install -U flake8 | ||
python -m pip install -U coverage coverage-python-version coveralls | ||
- name: Run flake8 | ||
run: flake8 *.py | ||
|
||
- name: Run tests | ||
run: coverage run testsuite.py | ||
|
||
- name: Check test coverage | ||
run: coverage report -m --fail-under=100 | ||
|
||
- name: Report to coveralls | ||
run: coveralls | ||
if: "matrix.python-version != '2.7' && matrix.python-version != 'pypy2'" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} | ||
COVERALLS_PARALLEL: true | ||
|
||
finish: | ||
name: Tell Coveralls that we're finished running all parallel jobs | ||
needs: build | ||
runs-on: ubuntu-latest | ||
container: python:3-slim | ||
steps: | ||
- run: pip3 install -U coveralls | ||
- run: coveralls --finish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters