Convert from schema to function #164
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: 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/ |