Skip to content

Commit

Permalink
Install poetry, install devs, and run lint & type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
dantp-ai committed Aug 10, 2024
1 parent c00d7fc commit c96f98f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,22 @@ jobs:
python-version: "3.11"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install --with dev -E ml
- name: Run black
run: poetry run black check .
- name: Run ruff
run: poetry run ruff check .
- name: Run mypy
run: poetry run mypy src tests

0 comments on commit c96f98f

Please sign in to comment.