Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Automatic testing of code changes before merging to the main branch did not exist. closes #16
- Loading branch information
Showing
7 changed files
with
138 additions
and
28 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
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
36 changes: 36 additions & 0 deletions
36
{{cookiecutter.project_slug}}/.github/workflows/test_contribution.yaml
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,36 @@ | ||
name: Test Contributions | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
# push: | ||
# branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
test_contribs: | ||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- 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 | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox |
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,29 +1,35 @@ | ||
[tox] | ||
envlist = py36, py37, py38, flake8 | ||
envlist = py36, py37,py38, py39, py38 pypy, docs | ||
skipsdist = true | ||
skip_missing_interpreters = true | ||
|
||
[travis] | ||
[testenv:docs] | ||
basepython=python | ||
changedir=docs/source | ||
deps= -r{toxinidir}/docs/requirements.txt | ||
commands= | ||
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html | ||
|
||
[gh-actions] | ||
python = | ||
pypy-3.8: pypy3 | ||
3.9: py39 | ||
3.8: py38 | ||
3.7: py37 | ||
3.6: py36 | ||
|
||
[testenv:flake8] | ||
basepython = python | ||
deps = flake8 | ||
commands = flake8 {{ cookiecutter.project_slug }} tests | ||
[gh-actions:env] | ||
PLATFORM = | ||
ubuntu-latest: linux | ||
macos-latest: macos | ||
windows-latest: windows | ||
|
||
|
||
[testenv] | ||
setenv = | ||
PYTHONPATH = {toxinidir} | ||
{% if cookiecutter.use_pytest == 'y' -%} | ||
deps = | ||
-r{toxinidir}/requirements_dev.txt | ||
; If you want to make tox run the tests with the same versions, create a | ||
; requirements.txt with the pinned versions and uncomment the following line: | ||
; -r{toxinidir}/requirements.txt | ||
commands = | ||
pip install -U pip | ||
pytest --basetemp={envtmpdir} | ||
{% else %} | ||
commands = python setup.py test | ||
{%- endif %} | ||
python -m pip install --upgrade pip | ||
pytest |