Skip to content

Commit 9f7662a

Browse files
committed
ci: Refactor and reduce CI scripts
We do not currently need to build and publish wheels from the CI, we only need to test them. I've removed the unnecessary steps. We'll add them once we have something to publish .github/workflows/ci.yml: Justfile: Signed-off-by: Tzanko Matev <[email protected]>
1 parent ec64a90 commit 9f7662a

File tree

2 files changed

+37
-30
lines changed

2 files changed

+37
-30
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,41 @@ on:
1010
jobs:
1111
nix-tests:
1212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["10","11","12","13"]
1316
steps:
1417
- uses: actions/checkout@v4
1518
- uses: cachix/install-nix-action@v27
1619
with:
1720
nix_path: nixpkgs=channel:nixos-25.05
1821
extra_nix_config: |
1922
experimental-features = nix-command flakes
20-
- name: Run tests via Nix
21-
run: nix develop --command just test
23+
- name: Build Rust module and run tests via Nix
24+
run: nix develop --command bash -lc 'just venv ${{matrix.python-version}} dev test'
2225

23-
rust-tests:
24-
name: Rust module test on ${{ matrix.os }} (Python ${{ matrix.python-version }})
25-
runs-on: ${{ matrix.os }}
26-
strategy:
27-
matrix:
28-
os: [ubuntu-latest, macos-latest, windows-latest]
29-
python-version: ["10", "11", "12", "13"]
30-
steps:
31-
- uses: actions/checkout@v4
32-
- uses: actions/setup-python@v5
33-
with:
34-
python-version: 3.${{ matrix.python-version }}
35-
- uses: astral-sh/setup-uv@v4
36-
- uses: messense/maturin-action@v1
37-
with:
38-
command: build
39-
args: --interpreter python3.${{ matrix.python-version }} -m crates/codetracer-python-recorder/Cargo.toml --release
40-
- name: Install and test built wheel with uv (pytest)
41-
shell: bash
42-
run: |
43-
v=${{matrix.python-version}}
44-
file=(crates/codetracer-python-recorder/target/wheels/*.whl)
45-
file="${file[0]}"
46-
uv run -p python3.$v --with "${file}" --with pytest -- python -m pytest crates/codetracer-python-recorder/test -q
26+
# rust-tests:
27+
# name: Rust module test on ${{ matrix.os }} (Python ${{ matrix.python-version }})
28+
# runs-on: ${{ matrix.os }}
29+
# strategy:
30+
# matrix:
31+
# os: [ubuntu-latest, macos-latest, windows-latest]
32+
# python-version: ["10", "11", "12", "13"]
33+
# steps:
34+
# - uses: actions/checkout@v4
35+
# - uses: actions/setup-python@v5
36+
# with:
37+
# python-version: 3.${{ matrix.python-version }}
38+
# - uses: astral-sh/setup-uv@v4
39+
# - uses: messense/maturin-action@v1
40+
# with:
41+
# command: build
42+
# args: --interpreter python3.${{ matrix.python-version }} -m crates/codetracer-python-recorder/Cargo.toml --release
43+
# - name: Install and test built wheel with uv (pytest)
44+
# shell: bash
45+
# run: |
46+
# v=${{matrix.python-version}}
47+
# file=(crates/codetracer-python-recorder/target/wheels/*.whl)
48+
# file="${file[0]}"
49+
# uv run -p python3.$v --with "${file}" --with pytest -- \
50+
# python -m pytest crates/codetracer-python-recorder/test tests/test_codetracer_api.py -q

Justfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default:
44
# Development helpers for the monorepo
55

66
# Python version used for development
7-
PYTHON_DEV_VERSION := "3.13"
7+
PYTHON_DEFAULT_VERSION := "3.13"
88

99
# Python versions used for multi-version testing/building with uv
1010
PY_VERSIONS := "3.10 3.11 3.12 3.13"
@@ -24,18 +24,21 @@ clean:
2424

2525

2626
# Create a clean local virtualenv for Python tooling (without editable packages installed)
27-
venv:
28-
uv sync -p python{{PYTHON_DEV_VERSION}}
27+
venv version=PYTHON_DEFAULT_VERSION:
28+
uv sync -p {{version}}
2929

3030
# Build the module in dev mode
3131
dev:
32-
just venv
3332
uv run --directory codetracer-python-recorder maturin develop --uv
3433

3534
# Run unit tests of dev build
3635
test:
3736
uv run --group dev --group test pytest
3837

38+
# Run tests only on the pure recorder
39+
test-pure:
40+
uv run --group dev --group test pytest codetracer-pure-python-recorder
41+
3942
# Build the module in release mode
4043
build:
4144
just venv \

0 commit comments

Comments
 (0)