Skip to content

Commit bea6e64

Browse files
committed
Lint is not test, extract in a different workflow
1 parent 3f55985 commit bea6e64

File tree

2 files changed

+41
-24
lines changed

2 files changed

+41
-24
lines changed

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_call:
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
FORCE_COLOR: "1"
15+
PYTHONUNBUFFERED: "1"
16+
UV_VERSION: "0.4.x"
17+
18+
jobs:
19+
pre-commit:
20+
runs-on: ubuntu-24.04
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
enable-cache: true
28+
version: ${{ env.UV_VERSION }}
29+
30+
- uses: actions/cache@v4
31+
with:
32+
path: ~/.cache/pre-commit/
33+
key: pre-commit-1|${{ hashFiles('.pre-commit-config.yaml') }}
34+
35+
- name: pre-commit
36+
run: |
37+
SKIP=no-commit-to-branch \
38+
uv run --with pre-commit-uv pre-commit run \
39+
--all-files \
40+
--show-diff-on-failure \
41+
--color always

.github/workflows/test.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,3 @@ jobs:
4242
4343
- name: Run tests
4444
run: cargo test --verbose
45-
46-
lint:
47-
runs-on: ubuntu-24.04
48-
steps:
49-
- uses: actions/checkout@v4
50-
51-
- name: Install uv
52-
uses: astral-sh/setup-uv@v5
53-
with:
54-
enable-cache: true
55-
version: ${{ env.UV_VERSION }}
56-
57-
- uses: actions/cache@v4
58-
with:
59-
path: ~/.cache/pre-commit/
60-
key: pre-commit-1|${{ hashFiles('.pre-commit-config.yaml') }}
61-
62-
- name: pre-commit
63-
run: |
64-
SKIP=no-commit-to-branch \
65-
uv run --with pre-commit-uv pre-commit run \
66-
--all-files \
67-
--show-diff-on-failure \
68-
--color always

0 commit comments

Comments
 (0)