test: add 23 surface tests for the CLI (#20) #65
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] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - run: pip install ruff | |
| - run: ruff check . | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: install runtime + dev deps (CPU torch) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --index-url https://download.pytorch.org/whl/cpu torch | |
| pip install \ | |
| torch-geometric \ | |
| numpy \ | |
| pandas \ | |
| scikit-learn \ | |
| networkx \ | |
| matplotlib \ | |
| seaborn \ | |
| plotly \ | |
| pm4py \ | |
| pytest \ | |
| hypothesis \ | |
| maturin | |
| pip install -e . | |
| - name: build pm_fast (Rust hot-path extension) | |
| # `maturin develop` insists on a virtualenv; CI has none, so build | |
| # a wheel and pip-install it instead. Tests pick it up via | |
| # modules._fast; if this step fails the suite still passes via | |
| # the Python fallback (just without parity coverage). | |
| working-directory: pm_fast | |
| run: | | |
| maturin build --release --out dist | |
| pip install dist/*.whl | |
| - name: pytest | |
| run: pytest -q | |
| rust: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: pm_fast — fmt + clippy | |
| working-directory: pm_fast | |
| run: | | |
| cargo fmt --check | |
| cargo clippy --release -- -D warnings | |
| - name: gnn_rs — fmt + clippy + test (v0.7 Rust orchestrator) | |
| working-directory: gnn_rs | |
| run: | | |
| cargo fmt --check | |
| cargo clippy --release -- -D warnings | |
| cargo test --release |