Skip to content

Commit 09b2786

Browse files
Merge pull request #24 from tskit-dev/prek1
Switch to prek
2 parents e8ca601 + 5511c2f commit 09b2786

1 file changed

Lines changed: 14 additions & 18 deletions

File tree

.github/workflows/lint.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
name: Reusable Lint Workflow
2-
3-
on:
4-
workflow_call:
5-
inputs:
6-
clang-format-version:
7-
description: 'Version of clang-format to use'
8-
required: false
9-
type: string
10-
default: ''
1+
# Requires
2+
# - pyproject.toml with a group called "lint" which must include prek
3+
# - A prek.toml file
4+
name: Lint workflow for tskit-dev
115

126
jobs:
13-
pre-commit:
7+
prek:
148
name: Lint
159
runs-on: ubuntu-24.04
1610
steps:
@@ -21,12 +15,14 @@ jobs:
2115

2216
- uses: actions/checkout@v4.2.2
2317

24-
- uses: actions/setup-python@v5.4.0
18+
- name: Install uv and set the python version
19+
uses: astral-sh/setup-uv@v6
2520
with:
26-
python-version: '3.12'
21+
python-version: 3.11
22+
version: "0.8.15"
23+
24+
- name: Install Python dependencies
25+
run: uv sync --locked --only-group lint
2726

28-
- name: Install clang-format (if needed)
29-
if: ${{ inputs.clang-format-version != '' }}
30-
run: pip install clang-format==${{ inputs.clang-format-version }}
31-
32-
- uses: pre-commit/action@v3.0.1
27+
- name: Run prek
28+
run: uv run --only-group lint prek -c prek.toml run --all-files

0 commit comments

Comments
 (0)