test: VC-2362 model regression tests #6
Workflow file for this run
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: Model Regression Tests | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| model: | |
| description: 'Model to test' | |
| required: true | |
| type: choice | |
| default: 'all' | |
| options: | |
| - all | |
| - SCGPT | |
| - SCVI | |
| - GENEFORMER | |
| - SCGENEPT | |
| - UCE | |
| - TRANSCRIPTFORMER | |
| mock_container: | |
| description: 'Whether to mock the container runner' | |
| required: true | |
| type: boolean | |
| default: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| model_regression: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install OpenMP | |
| run: sudo apt-get update && sudo apt-get install -y libomp-dev | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Run model regression test | |
| run: | | |
| source .venv/bin/activate | |
| MODEL_INPUT="${{ github.event.inputs.model }}" | |
| MOCK_CONTAINER_INPUT="${{ github.event.inputs.mock_container }}" | |
| if [ -z "$MODEL_INPUT" ]; then | |
| MODEL_INPUT="all" | |
| fi | |
| if [ -z "$MOCK_CONTAINER_INPUT" ]; then | |
| MOCK_CONTAINER_INPUT=true | |
| fi | |
| if [ "$MODEL_INPUT" = "all" ]; then | |
| if [ "$MOCK_CONTAINER_INPUT" = true ]; then | |
| pytest "tests/models/test_cli_model_regression.py" -vv -s --mock-container-runner | |
| else | |
| pytest "tests/models/test_cli_model_regression.py" -vv -s | |
| fi | |
| else | |
| if [ "$MOCK_CONTAINER_INPUT" = true ]; then | |
| pytest "tests/models/test_cli_model_regression.py::test_model_regression[${MODEL_INPUT}-human-human_spermatogenesis-clustering]" -vv -s --mock-container-runner | |
| else | |
| pytest "tests/models/test_cli_model_regression.py::test_model_regression[${MODEL_INPUT}-human-human_spermatogenesis-clustering]" -vv -s | |
| fi | |
| fi |