1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-08 08:20:29 +00:00

Install/run pre-commit directly

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.
This commit is contained in:
Jonathan Coates 2024-10-11 20:27:15 +02:00
parent bb04df7086
commit 0bef3ee0d8
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -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/action@v3.0.0
run: |
pipx install pre-commit
pre-commit run --show-diff-on-failure --color=always
- name: 🧪 Run tests
run: ./gradlew test validateMixinNames checkChangelog