Refactor repo structure to prepare addition of a Rust recorder #13
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 }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Run tests | |
shell: bash | |
run: python -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-24.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 }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: messense/maturin-action@v1 | |
with: | |
command: build | |
args: -m crates/codetracer-python-recorder/Cargo.toml --release | |
- name: Install built wheel | |
run: python -m pip install --upgrade pip && python -m pip install target/wheels/*.whl | |
- name: Import smoke test | |
run: python -c "import codetracer_python_recorder as m; print(m.hello())" |