Skip to content

Feature/support enumeration type hints #107

Feature/support enumeration type hints

Feature/support enumeration type hints #107

Workflow file for this run

name: Check Code
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
linting:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.11"
#----------------------------------------------
# install and run linters
#----------------------------------------------
- run: python -m pip install black flake8 isort
- run: |
flake8 . --count --show-source --statistics
black . --check
isort . --check
test:
needs: linting
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
runs-on: "ubuntu-latest"
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
# --------- install dependencies ---------
#----------------------------------------------
- name: Install dependencies
run: poetry install --no-interaction --no-root
#----------------------------------------------
# add matrix specifics and run test suite
#----------------------------------------------
- name: Run tests
run: |
poetry run pytest tests/