Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@ on:
pull_request:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pre-commit-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
runs-on: self-hosted
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.0
54 changes: 29 additions & 25 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,43 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: unit-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
MatterixUnitTests:
runs-on: self-hosted
defaults:
run:
shell: bash
env:
DOCKER_HOST: unix:///var/run/docker.sock
# Isaac/Sim integration and rendering checks belong in a separate trusted GPU job.
runs-on: ubuntu-latest
timeout-minutes: 15

steps:

- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v4

- name: Verify Docker install
run: |
docker --version
docker info

- name: Start Docker container
run: python3 docker/container.py start

- name: Run command inside the container
run: |
CONTAINER_ID=$(docker ps -qf "name=isaac-lab-base")
docker exec $CONTAINER_ID bash -c "echo Hello from inside the container!"
docker exec $CONTAINER_ID bash -c "ls /workspace"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: source/matterix_sm/pyproject.toml

- name: Stop container
- name: Install CPU test dependencies
run: |
python3 docker/container.py stop
python -m pip install --upgrade pip
python -m pip install "numpy>=1.23" pytest
python -m pip install "torch==2.10.0" --index-url https://download.pytorch.org/whl/cpu
python -m pip install --editable source/matterix_sm --no-deps

- name: Clean workspace
- name: Run CPU unit tests
run: |
rm -rf ./* .[^.]*
python -m pytest \
-q \
-p no:cacheprovider \
source/matterix_sm/test \
source/matterix/test
Loading