Refactor repo structure to prepare addition of a Rust recorder #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
tests: | |
name: Tests on ${{ matrix.os }} (Python ${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v4 | |
- name: Install Python via uv | |
shell: bash | |
run: uv python install ${{ matrix.python-version }} | |
- name: Run tests | |
shell: bash | |
run: uv run -p ${{ matrix.python-version }} -m unittest discover -v | |
nix-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v27 | |
with: | |
nix_path: nixpkgs=channel:nixos-25.05 | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
- name: Run tests via Nix | |
run: nix develop --command just test | |
rust-smoke: | |
name: Rust module smoke test on ${{ matrix.os }} (Python ${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["10", "11", "12", "13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.${{ matrix.python-version }} | |
- uses: astral-sh/setup-uv@v4 | |
- uses: messense/maturin-action@v1 | |
with: | |
command: build | |
args: --interpreter python3.${{ matrix.python-version }} -m crates/codetracer-python-recorder/Cargo.toml --release | |
- name: Install and smoke test built wheel with uv (pytest) | |
shell: bash | |
run: | | |
v={{matrix.python-version}} | |
file=(crates/codetracer-python-recorder/target/wheels/codetracer_python_recorder_*_cp3$v-cp3$v-*.whl) | |
file="${file[0]}" | |
uv run -p python3.$v --with "${file}" --with pytest -- python -m pytest crates/codetracer-python-recorder/test -q |