Skip to content

Commit f04576b

Browse files
committed
πŸ”§ Template: Add `precommit CI
Add a very basic pre-commit job to the Github Actions CI. Notes: * We use the Hatch script defined in the `pyproject.toml` to run the pre-commit. This makes it more likely that local and remote execution will be the same. * We fix the Python version of the runner to have a more deterministic CI. This does mean we'll have to update it once Python 3.13 is no longer supported, but that'll be a while.
1 parent e5fe8c8 commit f04576b

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: ci
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Install Python
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.13'
15+
16+
- name: Install Hatch
17+
run: pip install --upgrade pip hatch
18+
19+
- name: Run pre-commit
20+
run: hatch run precommit:run

0 commit comments

Comments
Β (0)