Skip to content

Commit

Permalink
Ensure Poetry check using pre-commit (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted authored Apr 8, 2024
1 parent d63a833 commit f136349
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash
working-directory: ${{ env.working-directory }}

steps:
Expand All @@ -32,11 +33,13 @@ jobs:
poetry-version: ${{ env.poetry-version }}
working-directory: ${{ env.working-directory }}

- name: Check Poetry config and lockfile
run: poetry run pre-commit run poetry-check --all-files

- name: Install dependencies
run: poetry install --no-interaction

- name: Lint (ruff)
shell: bash
run: |
if [[ "$RUNNER_OS" == "Linux" && "${{ matrix.python-version }}" == "3.10" ]]
then
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
repos:
- repo: local
hooks:
- id: poetry-check
name: poetry-check
description: validate Poetry config and dependency lockfile
entry: poetry check
language: python
pass_filenames: false
files: ^(.*/)?(pyproject\.toml|poetry\.lock)$
- id: ruff-lint
name: ruff-lint
entry: ruff check
Expand Down

0 comments on commit f136349

Please sign in to comment.