Skip to content

feat: black & isort common workflow #218

feat: black & isort common workflow

feat: black & isort common workflow #218

Workflow file for this run

name: taxonomy linters and tests
on:
push:
paths:
- taxonomy/**
- .github/worlflows/taxonomy.yml
pull_request:
paths:
- taxonomy/**
- .github/worlflows/taxonomy.yml
jobs:
taxonomy-linters-and-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8.15" ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: ./taxonomy
run: |
python -m pip install --upgrade pip
pip install poetry>=1.1.13
poetry install --no-root
poetry add ../lib/filter_lib
poetry add ../lib/tenants
- name: Run linters and checkers [flake8 -> isort -> black]
working-directory: ./taxonomy
run: |
poetry run flake8 --extend-ignore=E203 taxonomy/
poetry run isort --profile=black --line-length=79 --check-only taxonomy/
poetry run black --check --line-length=79 taxonomy/
- name: Run tests
working-directory: ./taxonomy
run: |
poetry run pytest tests/