Repository navigation
feat(go2):optimize the go2 Walk gait and increase the maximum command velocity. #491
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: Tests | |
| on: | |
| push: | |
| branches: [main, stable] | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| # Daily at 02:00 UTC (10:00 China Standard Time), on the default branch. | |
| - cron: "0 2 * * *" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: tests-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pytest: | |
| name: pytest (${{ matrix.suite }}, Python ${{ matrix.python }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13"] | |
| suite: ${{ fromJSON((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && '["full"]' || '["fast","numba"]') }} | |
| steps: | |
| - name: Resolve numba cache dir | |
| run: | | |
| # Redirect all Numba disk caches (manager fused kernels and term | |
| # specializations) to a single path so they can be cached between | |
| # runs. Kernel plan keys are content hashes, so stale cache entries | |
| # are simply unused and never produce wrong results. | |
| # Numba does not expand "~" in NUMBA_CACHE_DIR, so resolve the path | |
| # via $HOME here; the cache action below reads the same variable. | |
| echo "NUMBA_CACHE_DIR=$HOME/.cache/motrixlab/numba-manager" >> "$GITHUB_ENV" | |
| - name: Restore numba kernel cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/motrixlab | |
| key: numba-kernel-${{ runner.os }}-py${{ matrix.python }}-${{ matrix.suite }}-${{ github.sha }} | |
| restore-keys: | | |
| numba-kernel-${{ runner.os }}-py${{ matrix.python }}-${{ matrix.suite }}- | |
| numba-kernel-${{ runner.os }}-py${{ matrix.python }}- | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| lfs: true | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 | |
| with: | |
| version: "0.9.14" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install '${{ matrix.python }}' | |
| - name: Install workspace and test dependencies | |
| run: | | |
| if [ '${{ matrix.python }}' = '3.10' ]; then | |
| sh install.sh --all --python 3.10 | |
| else | |
| # Unitree/DDS runtime support remains limited to Python 3.10. | |
| uv sync --frozen --python '${{ matrix.python }}' --extra cuda --extra rslrl --extra skrl-jax --extra tbb --group test | |
| fi | |
| .venv/bin/python -c 'import sys; assert ".".join(map(str, sys.version_info[:2])) == "${{ matrix.python }}"' | |
| - name: Run tests | |
| run: | | |
| selection='' | |
| case '${{ matrix.suite }}' in | |
| fast) selection='not slow and not integration and not numba' ;; | |
| numba) selection='not integration and (slow or numba)' ;; | |
| esac | |
| set -- | |
| if [ '${{ matrix.python }}' != '3.10' ]; then | |
| set -- --ignore=motrix_deploy_unitree | |
| fi | |
| .venv/bin/python -m pytest -q --strict-markers --disable-warnings \ | |
| --durations=20 --junitxml=test-results/${{ matrix.suite }}.xml \ | |
| -m "$selection" "$@" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: pytest-py${{ matrix.python }}-${{ matrix.suite }} | |
| path: test-results/ | |
| if-no-files-found: warn |