Skip to content

Commit

Permalink
Add pre-commit test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Jan 16, 2025
1 parent 1c4db14 commit 514252e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,31 @@ jobs:
run: |
uv run --frozen mypy --install-types --non-interactive
pre-commit:
runs-on: macos-15
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5

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

- name: Install artisatomic and run pre-commit
run: |
uv sync --frozen
source .venv/bin/activate
uv pip install --editable .[dev]
uv run --frozen -- pre-commit run --all-files --show-diff-on-failure --color=always
pytest:
runs-on: macos-15
steps:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
hooks:
- id: yamlfmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
Expand Down

0 comments on commit 514252e

Please sign in to comment.