Skip to content

Commit e7e5f48

Browse files
committed
Separate test and lint CI build
1 parent 2f153e4 commit e7e5f48

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ jobs:
2828
- name: Install uv
2929
uses: astral-sh/setup-uv@v3
3030

31-
- name: "Lint"
32-
run: |
33-
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose
34-
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose
35-
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose
36-
3731
- name: "Run tests"
3832
run: |
3933
# We run tests against "." and not the tests directory as we test the README
@@ -45,6 +39,3 @@ jobs:
4539
with:
4640
fail_ci_if_error: true
4741
token: ${{ secrets.CODECOV_TOKEN }}
48-
49-
- uses: pre-commit-ci/lite-action@v1.0.3
50-
if: always()

.github/workflows/lint.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
3+
name: CI
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
schedule:
11+
# * is a special character in YAML so you have to quote this string
12+
# Run at 1:00 every day
13+
- cron: '0 1 * * *'
14+
15+
jobs:
16+
build:
17+
18+
strategy:
19+
matrix:
20+
python-version: ["3.12"]
21+
platform: ["ubuntu-latest", "windows-latest"]
22+
23+
runs-on: ${{ matrix.platform }}
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
30+
31+
- name: "Lint"
32+
run: |
33+
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose
34+
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose
35+
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose
36+
37+
- uses: pre-commit-ci/lite-action@v1.0.3
38+
if: always()

0 commit comments

Comments
 (0)