Programmatic execution of notebook #103
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: PR gate | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Only trigger the workflow with a PR to main | |
branches: | |
- main | |
# Only trigger the workflow when there is a change in these files | |
paths: | |
- api/** | |
- data_structures/** | |
- image_base/** | |
- io_base/** | |
- log_base/** | |
- machine_learning/** | |
- numpy_base/** | |
- optimization/** | |
- pandas_base/** | |
- system/** | |
- test/** | |
- url_base/** | |
- conftest.py | |
- requirements.txt | |
# Enable manual trigger | |
workflow_dispatch: | |
input: | |
tags: | |
description: 'Tags to label this manual run (optional)' | |
default: 'Manual run' | |
# Automatically cancel previous workflows if a new one is executed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test Python ${{ matrix.python }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
max-parallel: 20 # Usage limits: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration | |
matrix: | |
os: [macos-latest, ubuntu-20.04, ubuntu-22.04] # Available images: https://github.com/actions/runner-images/#available-images | |
python: ["3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 # Info: https://github.com/actions/checkout | |
- name: Use Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 # Info: https://github.com/actions/setup-python | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Python version and dependency list | |
run: | | |
echo "Python version expected: ${{ matrix.python }}" | |
python --version | |
which python | |
pip list | |
- name: Run tests | |
run: | | |
pytest test/pytest* -m "not system" --disable-warnings | |
python test/unittest_fixtures.py | |
- name: Run doctests | |
run: | | |
pytest --doctest-modules --continue-on-collection-errors --durations 0 --disable-warnings |