New example: AGL Simulation #1414
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: CPU Test | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main, stable/**/* ] | |
| pull_request: | |
| branches: [ main, stable/**/* ] | |
| workflow_dispatch: | |
| schedule: | |
| # Every day at noon and midnight | |
| - cron: '0 0,12 * * *' | |
| jobs: | |
| lint: | |
| strategy: | |
| matrix: | |
| setup: [fast, slow] | |
| name: Lint - ${{ matrix.setup }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: '3.12' | |
| - name: Sync dependencies (fast) | |
| run: uv sync --frozen --group dev --no-default-groups | |
| if: matrix.setup == 'fast' | |
| - name: Sync dependencies (slow) | |
| run: | | |
| uv sync --frozen \ | |
| --extra apo \ | |
| --extra verl \ | |
| --extra mongo \ | |
| --group dev \ | |
| --group torch-cpu \ | |
| --group torch-stable \ | |
| --group trl \ | |
| --group tinker \ | |
| --group agents \ | |
| --no-default-groups | |
| if: matrix.setup == 'slow' | |
| # This pre-commit skips JavaScript on purpose. | |
| - name: Run pre-commit | |
| uses: pre-commit/action@v3.0.1 | |
| - name: Check Python headers | |
| run: uv run --locked --no-sync scripts/check_headers.py | |
| - name: Run Black | |
| run: uv run --locked --no-sync black --check . | |
| - name: Run isort | |
| run: uv run --locked --no-sync isort --check-only . | |
| - name: Run pyright (fast) | |
| run: uv run --locked --no-sync pyright -p pyrightconfig.fast.json | |
| if: matrix.setup == 'fast' | |
| - name: Run pyright (slow) | |
| run: uv run --locked --no-sync pyright -p pyrightconfig.json | |
| if: matrix.setup == 'slow' | |
| lint-js: | |
| name: Lint - JavaScript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: cd dashboard && npm ci | |
| - name: Run ESLint | |
| run: cd dashboard && npm run eslint | |
| - name: Run Prettier | |
| run: cd dashboard && npm run prettier | |
| - name: Run Stylelint | |
| run: cd dashboard && npm run stylelint | |
| - name: Run Typecheck | |
| run: cd dashboard && npm run typecheck | |
| - name: Verify build | |
| run: cd dashboard && npm run build | |
| docs: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Sync dependencies | |
| run: uv sync --frozen --no-default-groups --group dev | |
| - name: Set source commit for docs | |
| run: | | |
| echo "SOURCE_COMMIT=${{ github.sha }}" >> $GITHUB_ENV | |
| - name: Build documentation | |
| run: uv run --locked --no-sync mkdocs build --strict | |
| - name: Upload docs artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation-site | |
| path: site/ | |
| compression-level: 6 | |
| test: | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: '3.10' | |
| setup-script: 'legacy' | |
| - python-version: '3.11' | |
| setup-script: 'stable' | |
| - python-version: '3.12' | |
| setup-script: 'stable' | |
| - python-version: '3.13' | |
| setup-script: 'latest' | |
| fail-fast: false | |
| name: Test with Python ${{ matrix.python-version }} (${{ matrix.setup-script }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade dependencies (latest) | |
| run: uv lock --upgrade | |
| if: matrix.setup-script == 'latest' | |
| - name: Sync dependencies (latest) | |
| run: uv sync --frozen --no-default-groups --extra apo --group dev --group agents --group core-stable | |
| if: matrix.setup-script == 'latest' | |
| - name: Sync dependencies (stable & legacy) | |
| run: uv sync --frozen --no-default-groups --extra apo --group dev --group agents --group core-${{ matrix.setup-script }} | |
| if: matrix.setup-script != 'latest' | |
| - name: Freeze dependencies | |
| run: | | |
| set -ex | |
| uv pip freeze | tee requirements-freeze.txt | |
| echo "UV_LOCKED=1" >> $GITHUB_ENV | |
| echo "UV_NO_SYNC=1" >> $GITHUB_ENV | |
| - name: Upload dependencies artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependencies-${{ matrix.python-version }}-${{ matrix.setup-script }} | |
| path: requirements-freeze.txt | |
| compression-level: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Install JavaScript dependencies | |
| run: cd dashboard && npm ci | |
| - name: Build dashboard | |
| run: cd dashboard && npm run build | |
| - name: Run tests | |
| run: | | |
| uv run pytest -v --durations=0 tests -m "not mongo" | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| test-js: | |
| name: Test - JavaScript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: '3.12' | |
| - name: Sync Python dependencies | |
| run: uv sync --frozen --no-default-groups --extra apo --group dev --group agents --group core-stable | |
| - name: Install JavaScript dependencies | |
| run: cd dashboard && npm ci | |
| - name: Run vitest | |
| run: cd dashboard && npm run vitest |