diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1823745..f796f57 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -47,11 +47,12 @@ jobs: pytest: name: Run Pytest - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'Bump version')" strategy: matrix: - python-version: ['3.10'] + python-version: [ '3.10' ] + os: [ 'ubuntu-latest', 'macos-latest' ] + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'Bump version')" steps: - name: actions/checkout uses: actions/checkout@v3 @@ -64,21 +65,32 @@ jobs: uses: eifinger/setup-rye@v4 with: enable-cache: true - cache-prefix: ubuntu-latest-rye-test-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} + cache-prefix: ${{ matrix.os }}-latest-rye-test-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} - name: actions/cache uses: actions/cache@v3 with: path: ${{ env.LOCAL_CACHE }} - key: ubuntu-latest-system-test-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} - restore-keys: ubuntu-latest-system-test - - name: Install test and package dependencies + key: ${{ matrix.os }}-latest-system-test-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} + restore-keys: ${{ matrix.os }}-latest-system-test-${{ matrix.python-version }} + + - name: Install Ubuntu test and package dependencies + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + set -x + sudo apt-get install -y xvfb +# sudo MUJOCO_PATH=/home/runner/.mujoco/ make install-envs + rye pin --relaxed cpython@${{ matrix.python-version }} + rye sync --all-features + ROM_PASSWORD=${{ secrets.ROM_PASSWORD }} rye run import-roms + + - name: Install MacOS test and package dependencies + if: ${{ matrix.os == 'macos-latest' }} run: | set -x - sudo apt-get install -y xvfb -y - sudo MUJOCO_PATH=/home/runner/.mujoco/ make install-envs + brew install xvfb rye pin --relaxed cpython@${{ matrix.python-version }} rye sync --all-features - ROM_PASSWORD=${{ secrets.ROM_PASSWORD }} make import-roms + ROM_PASSWORD=${{ secrets.ROM_PASSWORD }} rye run import-roms - name: Test with pytest run: | @@ -86,7 +98,8 @@ jobs: xvfb-run -s "-screen 0 1400x900x24" rye run codecov - name: Upload coverage report - if: ${{ matrix.python-version=='3.10' }} + # if: ${{ matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-latest' }} uses: codecov/codecov-action@v4 with: fail_ci_if_error: false # optional (default = false) diff --git a/pyproject.toml b/pyproject.toml index c6eb118..d16ce16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ nes = [ ] classic-control = ["gymnasium[classic_control]>=0.29.1, == 0.*", "pygame>=2.6.0"] ray = ["ray>=2.35.0"] -dm_control = ["dm-control>=1.0.22", "gym @ git+https://github.com/FragileTech/gym.git"] +dm_control = ["mujoco>=3.2.2", "dm-control>=1.0.22", "gym @ git+https://github.com/FragileTech/gym.git"] retro = ["stable_retro"] jupyter = ["jupyterlab>=3.2.0"] box_2d = ["box2d-py==2.3.5"] diff --git a/requirements-dev.lock b/requirements-dev.lock index 72c9ece..bbe27bd 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -265,6 +265,7 @@ msgpack==1.0.8 # via ray mujoco==3.2.2 # via dm-control + # via plangym myst-nb==1.1.1 # via plangym myst-parser==4.0.0 diff --git a/requirements.lock b/requirements.lock index 278bc03..ed55b81 100644 --- a/requirements.lock +++ b/requirements.lock @@ -265,6 +265,7 @@ msgpack==1.0.8 # via ray mujoco==3.2.2 # via dm-control + # via plangym myst-nb==1.1.1 # via plangym myst-parser==4.0.0