Skip to content

Merge pull request #8 from JeremieGince/dev #23

Merge pull request #8 from JeremieGince/dev

Merge pull request #8 from JeremieGince/dev #23

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "*" ]
permissions:
contents: read
jobs:
Run-tests-on-Ubuntu:
name: Run tests on Ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv ./venv
. ./venv/bin/activate
python -m pip install --upgrade pip
pip install poetry
poetry install --with=dev --no-interaction --no-ansi
- name: Test Linting
run: |
. ./venv/bin/activate
black src --check --diff
black tests --check --diff
- name: Test Typing
run: |
. ./venv/bin/activate
mypy src
mypy tests
- name: Test Notebooks
run: |
. ./venv/bin/activate
pytest --nbmake notebooks --nbmake-timeout=600 # 10 minutes timeout
- name: Test Unittests with pytest
run: |
. ./venv/bin/activate
python run_pytests.py tests --N_RANDOM_TESTS_PER_CASE=3 --run_slow=False
Run-tests-on-Windows:
name: Run tests on Windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv ./venv
. ./venv/Scripts/activate
python -m pip install --upgrade pip
pip install poetry
poetry install --with=dev --no-interaction --no-ansi
- name: Test Unittests with pytest
run: |
. ./venv/Scripts/activate
python run_pytests.py tests --N_RANDOM_TESTS_PER_CASE=3 --run_slow=False