Skip to content

Commit b0932cc

Browse files
committed
reorder to run faster checks (Python format) earlier
1 parent af846d8 commit b0932cc

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.github/workflows/_test.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818

19-
- run: rustup toolchain install stable --profile minimal
20-
- name: Rust Cache
21-
uses: Swatinem/rust-cache@v2
22-
with:
23-
key: ${{ runner.os }}-rust-${{ matrix.python-version }}
24-
- name: Rust build
25-
run: cargo build --verbose
26-
- name: Rust tests
27-
run: cargo test --verbose
28-
2919
- uses: actions/setup-python@v5
3020
with:
3121
python-version: ${{ matrix.python-version }}
@@ -43,6 +33,21 @@ jobs:
4333
run: |
4434
source .venv/bin/activate
4535
pip install maturin pytest mypy ruff
36+
- name: Check Python formatting
37+
run: |
38+
source .venv/bin/activate
39+
python -m ruff format --check .
40+
41+
- run: rustup toolchain install stable --profile minimal
42+
- name: Rust Cache
43+
uses: Swatinem/rust-cache@v2
44+
with:
45+
key: ${{ runner.os }}-rust-${{ matrix.python-version }}
46+
- name: Rust build
47+
run: cargo build --verbose
48+
- name: Rust tests
49+
run: cargo test --verbose
50+
4651
- name: Python build
4752
run: |
4853
source .venv/bin/activate
@@ -54,8 +59,4 @@ jobs:
5459
- name: Python tests
5560
run: |
5661
source .venv/bin/activate
57-
pytest python/cocoindex/tests
58-
- name: Check Python formatting
59-
run: |
60-
source .venv/bin/activate
61-
python -m ruff format --check .
62+
pytest python/cocoindex/tests

0 commit comments

Comments
 (0)