Skip to content

Commit

Permalink
feat(poetry-pre-commit): Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
janw committed Jan 28, 2024
1 parent 67b4fbb commit a148cbb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/poetry-pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Poetry x pre-commit

on:
workflow_call:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Set up python environment
uses: actions/setup-python@v5
with:
cache: poetry

- name: Install dependencies
run: poetry install --no-root --sync

- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-v0|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}

- run: poetry run pre-commit run --show-diff-on-failure --color=always --all-files
shell: bash

0 comments on commit a148cbb

Please sign in to comment.