Introduce tox for testing #468
Workflow file for this run
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
name: Build and Test | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
paths: | |
- '*' | |
jobs: | |
sdist: | |
name: Build distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip3 install --break-system-packages setuptools wheel twine | |
- name: Build distribution | |
run: python3 setup.py sdist | |
test: | |
name: Run mock unit tests | |
runs-on: ubuntu-latest | |
container: precice/precice:nightly | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install FEniCS and tox | |
run: | | |
apt update | |
apt install -y software-properties-common | |
add-apt-repository ppa:fenics-packages/fenics -y | |
apt update | |
apt install -y fenics tox | |
- name: Run unit tests | |
run: tox -e unit | |
- name: Run integration tests | |
run: tox -e integration |