final presentation nb and shape data; omit file check in pre-commit #111
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Run tests | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
env: | |
POETRY_VERSION: 1.6.1 | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11"] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run poetry image | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: $POETRY_VERSION | |
- name: Install dependencies | |
run: | | |
poetry install --with dev | |
- name: Run tests | |
run: | | |
poetry run pytest --cov=pystatis tests | |
code-quality: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
# only support specific python version, as guidelines differ beween (minor) versions | |
python-version: ["3.11.6"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run poetry image | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: $POETRY_VERSION | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Run black | |
run: poetry run black . --check | |
- name: Run isort | |
run: poetry run isort . --check-only | |
- name: Run flake8 | |
run: poetry run flake8 src --output-file=flake8_report.txt | |
- name: Run pylint | |
run: poetry run pylint src --recursive=y | |
- name: Run bandit | |
run: poetry run bandit -r src | |
- name: Run safety | |
run: poetry run safety check | |
- name: Run mypy | |
run: poetry run mypy src | |
sphinx-documentation: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run poetry image | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: $POETRY_VERSION | |
- name: Install dependencies | |
run: | | |
poetry install --with dev | |
- name: Build documentation | |
run: | | |
cd docs | |
poetry run make clean | |
poetry run make html | |
- name: Upload documentation as artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: docs/build/html/* | |
retention-days: 5 |