Skip to content

Commit ec82496

Browse files
committed
Update Github actions workflow
1 parent aa09ad2 commit ec82496

1 file changed

Lines changed: 41 additions & 51 deletions

File tree

.github/workflows/main.yml

Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,31 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
check_python:
13-
name: Check Python ${{ matrix.python-version }}, ${{ matrix.os }}
12+
check:
13+
runs-on: ubuntu-24.04
14+
name: Lint and check docs build
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install just
19+
uses: extractions/setup-just@v3
20+
21+
- name: Install uv and set the latest supported Python version
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
python-version: 3.14
25+
26+
- name: Lint Python
27+
run: just lint-python
28+
29+
- name: Lint Rust
30+
run: just lint-rust
31+
32+
- name: Check docs build
33+
run: just build-docs
34+
35+
test:
36+
name: Run tests for Python ${{ matrix.python-version }}, ${{ matrix.os }}
1437
runs-on: ${{ matrix.os }}
1538

1639
strategy:
@@ -22,69 +45,36 @@ jobs:
2245

2346
steps:
2447
- uses: actions/checkout@v4
25-
- uses: actions-rs/toolchain@v1
26-
with:
27-
toolchain: stable
28-
- uses: actions/setup-python@v6
48+
49+
- name: Install just
50+
uses: extractions/setup-just@v3
51+
52+
- name: Install uv and set the Python version
53+
uses: astral-sh/setup-uv@v7
2954
with:
3055
python-version: ${{ matrix.python-version }}
31-
- name: Install dependencies
32-
run: |
33-
python -VV
34-
python -m site
35-
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade coverage[toml] tox tox-gh-actions
37-
38-
- name: Run tox targets for ${{ matrix.python-version }}
39-
run: python -m tox
40-
41-
check_rust:
42-
name: Check Rust
43-
runs-on: ubuntu-24.04
44-
steps:
45-
- uses: actions/checkout@v4
46-
- uses: actions-rs/toolchain@v1
47-
with:
48-
toolchain: stable
49-
- name: Print versions
50-
run: cargo version --verbose && cargo clippy --version
51-
- name: Check formatting
52-
run: cargo fmt --check
53-
working-directory: ./rust
54-
- name: Run tests
55-
run: cargo test --no-default-features
56-
working-directory: ./rust
57-
- name: Run linter (clippy)
58-
run: cargo clippy --all-targets --all-features -- -D warnings
59-
working-directory: ./rust
56+
57+
- name: Test Python
58+
run: just test-python
59+
60+
- name: Test Rust
61+
run: just test-rust
6062

6163
benchmarks:
6264
runs-on: ubuntu-24.04
6365
steps:
6466
- uses: actions/checkout@v5
6567

68+
- name: Install just
69+
uses: extractions/setup-just@v3
70+
6671
- name: Install uv
6772
uses: astral-sh/setup-uv@v7
6873

69-
- name: Setup python
70-
uses: actions/setup-python@v6
71-
with:
72-
python-version: "3.13"
73-
allow-prereleases: true
74-
75-
# Temporarily install hardcoded dependencies here.
76-
# Codspeed doesn't work well with tox, as it runs the tox installation process as part of the benchmarking
77-
# process, which is very slow.
78-
- name: Install dependencies
79-
run: |
80-
python -VV
81-
uv venv
82-
uv pip install pytest==7.4.4 pyyaml==6.0.1 pytest-codspeed==3.2.0 Django==5.1.1 /home/runner/work/grimp/grimp
83-
8474
- name: Run benchmarks
8575
uses: CodSpeedHQ/action@v4
8676
with:
8777
token: ${{ secrets.CODSPEED_TOKEN }}
8878
mode: instrumentation
8979
run: |
90-
uv run pytest tests/benchmarking/ --codspeed
80+
just benchmark-ci

0 commit comments

Comments
 (0)