Slow Tests #1
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: Slow Tests | |
| on: | |
| schedule: | |
| # Run nightly at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| test-slow-gpu: | |
| name: Slow Tests on GPU | |
| runs-on: [self-hosted, linux, gpu] | |
| timeout-minutes: 15 | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Check GPU availability | |
| run: | | |
| nvidia-smi | |
| python -c "import torch; print(f'PyTorch CUDA available: {torch.cuda.is_available()}')" || echo "PyTorch not installed yet" | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-slow-gpu-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-slow-gpu- | |
| ${{ runner.os }}-pip-gpu- | |
| ${{ runner.os }}-pip- | |
| - name: Upgrade pip and build tools | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| - name: Install PyTorch (CUDA 12.6) | |
| run: | | |
| pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 | |
| - name: Install package with test dependencies | |
| run: | | |
| pip install -e ".[test]" | |
| - name: Run slow tests | |
| run: | | |
| pytest tests/ -v -m "slow" --cov=physiomotion4d --cov-report=xml --cov-report=term | |
| env: | |
| CUDA_VISIBLE_DEVICES: 0 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: slow-tests-gpu | |
| name: codecov-slow-gpu | |
| fail_ci_if_error: false | |