Skip to content

Commit

Permalink
Install/run pre-commit directly
Browse files Browse the repository at this point in the history
The update to Python 3.12 has broken the pre-commit action (as it
installs via pip rather than pipx). The maintainer seems unwilling to
fix it (to put it diplomatically), so let's just stop using the action
and imlement it ourselves.
  • Loading branch information
SquidDev committed Oct 11, 2024
1 parent bb04df7 commit 0bef3ee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ jobs:
- name: ⚒️ Build
run: ./gradlew assemble || ./gradlew assemble

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

- name: 💡 Lint
uses: pre-commit/[email protected]
run: |
pipx install pre-commit
pre-commit run --show-diff-on-failure --color=always
- name: 🧪 Run tests
run: ./gradlew test validateMixinNames checkChangelog
Expand Down

0 comments on commit 0bef3ee

Please sign in to comment.