ci: rerun qpos artifact on temp branch #398
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, ci-rerun/qpos-102a593-20260522] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install ruff mypy | |
| - name: Ruff lint | |
| run: ruff check . | |
| - name: Ruff format check | |
| run: ruff format --check . | |
| - name: Mypy type check | |
| run: mypy src/ | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install package with dev dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Verify test collection (catch missing imports early) | |
| run: pytest --collect-only -q | |
| - name: Run tests with coverage | |
| run: pytest | |
| test-mujoco: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install system dependencies (OSMesa for headless rendering) | |
| run: sudo apt-get update && sudo apt-get install -y libosmesa6-dev | |
| - name: Install package with MuJoCo backend and dev dependencies | |
| run: pip install -e ".[mujoco,dev]" Pillow | |
| - name: Run tests (including MuJoCo-dependent tests) | |
| env: | |
| MUJOCO_GL: osmesa | |
| run: pytest | |
| mujoco-example: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install system dependencies (OSMesa for headless rendering) | |
| run: sudo apt-get update && sudo apt-get install -y libosmesa6-dev | |
| - name: Install package with MuJoCo backend | |
| run: pip install -e ".[mujoco]" Pillow | |
| - name: Run MuJoCo grasp example | |
| env: | |
| MUJOCO_GL: osmesa | |
| run: python examples/mujoco_grasp.py --report --assert-success --output-dir ./harness_output | |
| - name: Upload visual artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mujoco-grasp-output | |
| path: | | |
| harness_output/report.html | |
| harness_output/mujoco_grasp/trial_001/**/*_rgb.png | |
| harness_output/mujoco_grasp/trial_001/**/metadata.json | |
| retention-days: 30 | |
| - name: Post summary with checkpoint images | |
| if: always() | |
| run: | | |
| echo "## MuJoCo Grasp Example Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Checkpoint captures from the scripted grasp sequence:" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| for cp in harness_output/mujoco_grasp/trial_001/*/; do | |
| name=$(basename "$cp") | |
| echo "### ${name}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| # Embed front view as base64 in summary | |
| if [ -f "${cp}front_rgb.png" ]; then | |
| echo ")" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [ -f "${cp}metadata.json" ]; then | |
| step=$(python3 -c "import json; print(json.load(open('${cp}metadata.json'))['step'])") | |
| sim_time=$(python3 -c "import json; print(f\"{json.load(open('${cp}metadata.json'))['sim_time']:.3f}\")") | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Step: ${step} | Sim time: ${sim_time}s" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| done | |
| echo "---" >> $GITHUB_STEP_SUMMARY | |
| echo "Download the full artifact (including HTML report) from the Actions tab." >> $GITHUB_STEP_SUMMARY |