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
4 changes: 1 addition & 3 deletions .github/workflows/unit-tests-docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Unit Tests
on:
push:
branches: [ "master", "develop"]
pull_request:
branches: [ "master", "develop"]

Expand All @@ -22,7 +20,7 @@ jobs:
- name: Extract coverage
run: |
docker run --rm -v $(pwd):/host oprl sh -c "
pytest --cov=oprl --cov-report=xml &&
pytest tests/functional --cov=oprl --cov-report=xml &&
cp coverage.xml /host/
"

Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ WORKDIR /app

RUN pip install --no-cache-dir --upgrade pip

# Install SafetyGymansium from external lib
RUN wget https://github.com/PKU-Alignment/safety-gymnasium/archive/refs/heads/main.zip && \
unzip main.zip && \
cd safety-gymnasium-main && \
pip install . && \
cd ..

COPY . .

RUN pip install --no-cache-dir . && pip install pytest pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
]


env_names: list[str] = dm_control_envs # + safety_envs
env_names: list[str] = dm_control_envs + safety_envs


@pytest.mark.parametrize("env_name", env_names)
Expand Down
Loading