docs: simplify extras install examples #650
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
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| TMPDIR: /mnt/tmp | |
| PRE_COMMIT_HOME: /mnt/pre-commit-cache | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare temp/cache directories on /mnt | |
| run: | | |
| sudo mkdir -p "$TMPDIR" "$PRE_COMMIT_HOME" | |
| sudo chown "$USER":"$USER" "$TMPDIR" "$PRE_COMMIT_HOME" | |
| df -h / | |
| df -h /mnt | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Create lint environment | |
| run: uv venv --python 3.11 | |
| - name: Install lint dependencies | |
| run: uv pip install --python .venv/bin/python pre-commit black isort | |
| - name: Run lint | |
| run: .venv/bin/pre-commit run --all-files | |
| unit_tests: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - test-suite: analysis | |
| install-target: . | |
| - test-suite: evaluation | |
| install-target: ".[pyserini]" | |
| needs-java: true | |
| - test-suite: rerank | |
| install-target: ".[cloud,vllm]" | |
| env: | |
| TMPDIR: /mnt/tmp | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare temp directory on /mnt | |
| run: | | |
| sudo mkdir -p "$TMPDIR" | |
| sudo chown "$USER":"$USER" "$TMPDIR" | |
| df -h / | |
| df -h /mnt | |
| - uses: actions/setup-java@v3 | |
| if: ${{ matrix.needs-java }} | |
| with: | |
| distribution: "temurin" | |
| java-version: "21" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Create test environment | |
| run: uv venv --python 3.11 | |
| - name: Install test environment | |
| run: uv pip install --python .venv/bin/python -e "${{ matrix.install-target }}" | |
| - name: Run tests | |
| run: .venv/bin/python -m unittest discover -s "test/${{ matrix.test-suite }}" | |
| cli_smoke: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| env: | |
| TMPDIR: /mnt/tmp | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare temp directory on /mnt | |
| run: | | |
| sudo mkdir -p "$TMPDIR" | |
| sudo chown "$USER":"$USER" "$TMPDIR" | |
| df -h / | |
| df -h /mnt | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Create CLI environment | |
| run: uv venv --python 3.11 | |
| - name: Install CLI smoke environment | |
| run: | | |
| uv pip install --python .venv/bin/python -e . | |
| uv pip install --python .venv/bin/python fastapi uvicorn "fastmcp>=2.0,<3" | |
| echo "$PWD/.venv/bin" >> "$GITHUB_PATH" | |
| - name: Run CLI smoke tests | |
| run: | | |
| .venv/bin/python -m unittest \ | |
| test.test_cli_packaging \ | |
| test.test_cli_scaffolding \ | |
| test.test_cli_rerank_command \ | |
| test.test_cli_validation \ | |
| test.test_cli_prompt \ | |
| test.test_cli_view \ | |
| test.test_cli_introspection \ | |
| test.test_cli_utilities \ | |
| test.test_cli_http \ | |
| test.test_cli_mcp \ | |
| test.test_cli_legacy_wrappers |