Skip to content

Commit 2312bcf

Browse files
committed
Separate pre-commit and tests jobs
1 parent 43427d9 commit 2312bcf

2 files changed

Lines changed: 28 additions & 18 deletions

File tree

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pre-commit and tests
1+
name: pre-commit
22

33
on:
44
pull_request:
@@ -34,20 +34,3 @@ jobs:
3434
echo "$newfiles"
3535
exit 1
3636
fi
37-
38-
tests:
39-
runs-on: ubuntu-22.04
40-
steps:
41-
- uses: actions/checkout@v4
42-
- uses: actions/setup-python@v5
43-
with:
44-
python-version: "3.11"
45-
- name: Install uv and sync dev dependencies
46-
run: |
47-
pip install uv
48-
uv venv
49-
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
50-
echo "$PWD/.venv/bin" >> $GITHUB_PATH
51-
uv sync --dev
52-
- name: Run tests with pytest
53-
run: pytest

.github/workflows/tests.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main*"
7+
push:
8+
branches:
9+
- "main"
10+
11+
jobs:
12+
tests:
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.11"
19+
- name: Install uv and sync dev dependencies
20+
run: |
21+
pip install uv
22+
uv venv
23+
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
24+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
25+
uv sync --dev
26+
- name: Run tests with pytest
27+
run: pytest

0 commit comments

Comments
 (0)