Skip to content

Commit

Permalink
Merge bf41b5c into 1794a73
Browse files Browse the repository at this point in the history
  • Loading branch information
pronovic committed Feb 7, 2021
2 parents 1794a73 + bf41b5c commit 887569a
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 14 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest
#strategy:
#matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
#python: [3.7, 3.8, 3.9]
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
python: [3.9]
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -37,4 +41,22 @@ jobs:
run: poetry install -v
if: steps.cached-poetry.outputs.cache-hit != 'true'
- name: Run Tox test suite
run: poetry run tox -c .toxrc -e "precommit,{py}-{coverage,nocoverage}"
run: poetry run tox -c .toxrc -e "checks,coverage"
- name: Upload coverage data to coveralls.io
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ runner.os }}-python${{ matrix.python }}
COVERALLS_PARALLEL: true
coveralls:
name: Indicate completion to coveralls.io
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 10 additions & 9 deletions .toxrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
[tox]
isolated_build = true
envlist =
precommit,
checks,
docs,
{py}-{coverage,nocoverage}
coverage
ignore_basepython_conflict = true

[testenv]
[testenv:checks]
whitelist_externals = poetry
commands =
nocoverage: poetry run pytest tests
coverage: poetry run coverage erase
coverage: poetry run coverage run -m pytest tests
coverage: poetry run coverage report
poetry --version
poetry version
poetry run pre-commit run --all-files --show-diff-on-failure

[testenv:precommit]
[testenv:coverage]
whitelist_externals = poetry
commands =
poetry --version
poetry version
poetry run pre-commit run --all-files --show-diff-on-failure
poetry run coverage erase
poetry run coverage run -m pytest tests
poetry run coverage report

[testenv:docs]
whitelist_externals = poetry
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ chardet==4.0.0; python_version >= "3.5" and python_full_version < "3.0.0" or pyt
click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
colorama==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" and platform_system == "Windows" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.5.0" and platform_system == "Windows"
coverage==5.4; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0" and python_version < "4")
coveralls==3.0.0; python_version >= "3.5"
distlib==0.3.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
docopt==0.6.2; python_version >= "3.5"
docutils==0.16; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
dparse==0.5.1; python_version >= "3.5"
filelock==3.0.12; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
Expand Down
33 changes: 32 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ mypy = "^0.790"
isort = "^5.0.0"
sphinx-autoapi = "^1.3.0"
safety = "^1.10.3"
coveralls = "^3.0.0"

[tool.black]
line-length = 132
Expand Down
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ run_tox() {
run_install
fi

poetry run tox -c .toxrc -e "precommit,docs,{py}-{coverage,nocoverage}"
poetry run tox -c .toxrc -e "checks,docs,coverage"
if [ $? != 0 ]; then
exit 1
fi
Expand Down

0 comments on commit 887569a

Please sign in to comment.