Merge pull request #1121 from BinItAI/docs/remove-python-tooling-readme #354
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: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| push: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra tests | |
| - name: Run unit tests | |
| run: uv run pytest -v --tb=short --ignore tests/test_modal_coco_training_on_modal.py | |
| - name: Run tests with coverage | |
| if: matrix.python-version == '3.14' | |
| run: uv run pytest --cov=mmdet --cov-report=term-missing --cov-report=xml --ignore tests/test_modal_coco_training_on_modal.py | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.14' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| modal-coco-train-smoke: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| env: | |
| VISDET_COCO_VOLUME: "visdet-coco" | |
| MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID || vars.MODAL_TOKEN_ID }} | |
| MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET || vars.MODAL_TOKEN_SECRET }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --extra tests --group dev | |
| - name: Check Modal auth env | |
| run: | | |
| if [ -z "${MODAL_TOKEN_ID:-}" ] || [ -z "${MODAL_TOKEN_SECRET:-}" ]; then | |
| echo "MODAL_TOKEN_ID and MODAL_TOKEN_SECRET must be set (secrets or vars)." | |
| exit 1 | |
| fi | |
| - name: Ensure COCO is present in Modal Volume | |
| run: uv run python -m modal run tools/modal/download_coco2017_to_volume.py --no-include-train | |
| - name: Run Modal COCO training smoke test | |
| run: uv run pytest -s -v --tb=short tests/test_modal_coco_training_on_modal.py |