-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable tox tests and github actions around it
- Loading branch information
1 parent
40000ad
commit cb50c11
Showing
3 changed files
with
60 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: run tox | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'tox-test' | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9"] | ||
testsuite: ["minimal"] # "full" | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: set up python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: install system dependencies (linux) | ||
if: runner.os == 'Linux' | ||
# only managed to install system dependencies on Linux runners | ||
run: | | ||
sudo apt update | ||
sudo apt install libgmp-dev libmpfr-dev libmpc-dev | ||
- name: install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: run tox (linux) | ||
# since system dependencies could only be installed on Linux runners, we run the "full" suite only on Linux ... | ||
if: runner.os == 'Linux' | ||
run: tox -e py-${{ matrix.testsuite }} -- --hypothesis-profile=ci | ||
- name: run tox (macos or windows - minimal) | ||
if: runner.os != 'Linux' && matrix.testsuite == 'minimal' | ||
run: tox -e py-minimal -- --hypothesis-profile=ci | ||
- name: run tox (macos or windows - recommendedextra) | ||
# ... on all other OS we run the "recommendedextra" suite instead of the "full" suite | ||
if: runner.os != 'Linux' && matrix.testsuite == 'full' | ||
run: tox -e py-recommendedextra -- --hypothesis-profile=ci |
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 |
---|---|---|
|
@@ -23,3 +23,5 @@ docs/source/_examples | |
.DS_Store | ||
|
||
.vscode/ | ||
|
||
*.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[tox] | ||
envlist = py38,py39,py-minimal | ||
|
||
[testenv] | ||
# install pytest in the virtualenv where commands will be executed | ||
deps = pytest | ||
commands = | ||
# NOTE: you can run any command line tool here - not just tests | ||
pytest |