Changes for Sumo #470
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: Precommit | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| precommit: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: prefix-dev/setup-pixi@v0.9.3 | |
| with: | |
| pixi-version: latest | |
| cache: true | |
| # ── Stubs cache ──────────────────────────────────────────────── | |
| - name: Restore typings cache | |
| uses: actions/cache@v5 | |
| id: typings-cache | |
| with: | |
| path: typings | |
| key: typings-${{ matrix.os }}-${{ hashFiles('pyproject.toml') }} | |
| - name: Generate stubs if cache miss | |
| if: steps.typings-cache.outputs.cache-hit != 'true' | |
| run: pixi run -e dev pybind11-stubgen mujoco -o typings/ | |
| # ── Linting & type checking ──────────────────────────────────── | |
| - name: Run Ruff Linter | |
| run: pixi run -e dev ruff check judo/ tests/ --output-format=github | |
| - name: Run Ruff Formatter | |
| run: pixi run -e dev ruff format judo/ tests/ --diff | |
| - name: Run Pyright | |
| run: pixi run -e dev pyright |