add classification examples #321
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: Style check | |
on: push | |
jobs: | |
style-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
# Allow loading a cached venv created in a previous run if the lock file is identical | |
- name: Load cached venv if it exists | |
id: venv-cache | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/pyproject.toml') }} | |
- name: Install dependencies | |
if: steps.venv-cache.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction | |
- name: Check format with black | |
run: poetry run black --check . | |
- name: Check style with flake8 | |
run: poetry run flake8 . | |
- name: Check import sorting with isort | |
run: poetry run isort --check . |