Skip to content

Enable tox tests and github actions around it #25

Enable tox tests and github actions around it

Enable tox tests and github actions around it #25

Workflow file for this run

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