Skip to content

Commit 2a2f056

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 702dec5 commit 2a2f056

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,43 @@ on:
99

1010
jobs:
1111
nix-tests:
12+
name: Testing on Python ${{matrix.python-version}}
1213
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.10","3.11","3.12","3.13"]
1317
steps:
1418
- uses: actions/checkout@v4
1519
- uses: cachix/install-nix-action@v27
1620
with:
1721
nix_path: nixpkgs=channel:nixos-25.05
1822
extra_nix_config: |
1923
experimental-features = nix-command flakes
20-
- name: Run tests via Nix
21-
run: nix develop --command just test
24+
- name: Build Rust module and run tests via Nix
25+
run: nix develop --command bash -lc 'just venv ${{matrix.python-version}} dev test'
2226

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