Skip to content

Commit

Permalink
run pre-commit with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
Fogapod committed Aug 25, 2024
1 parent 48f882f commit a079604
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ jobs:
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: pre-commit cache key
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh
- name: Set up Python
run: uv python install
- name: install mypy
run: uv sync --dev
- uses: pre-commit/[email protected]
- name: pre-commit
run: uv run pre-commit run --all-files
- name: Minimize uv cache
run: uv cache prune --ci

Expand Down

0 comments on commit a079604

Please sign in to comment.