From b0c559b6b7916136dbf213dbba0a2444a5756f2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cem=20G=C3=B6kmen?=
<1408354+cgokmen@users.noreply.github.com>
Date: Wed, 20 Mar 2024 18:09:34 -0700
Subject: [PATCH 01/10] Make the README test badge show main instead of
og-develop
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2a8797654..73338c51a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
![splash](./docs/assets/splash.png)
#
OmniGibson
-[![Tests](https://github.com/StanfordVL/OmniGibson/actions/workflows/tests.yml/badge.svg?branch=og-develop&event=push)](https://github.com/StanfordVL/OmniGibson/actions/workflows/tests.yml)
+[![Tests](https://github.com/StanfordVL/OmniGibson/actions/workflows/tests.yml/badge.svg?branch=main&event=push)](https://github.com/StanfordVL/OmniGibson/actions/workflows/tests.yml)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/stanfordvl/omnigibson?label=docker&sort=semver)](https://hub.docker.com/r/stanfordvl/omnigibson)
[![Realtime Speed](https://behavior.stanford.edu/knowledgebase/profile/badge.svg)](https://stanfordvl.github.io/OmniGibson/profiling/)
From 7dd025aef69435733124c5d4f6d51bfcbfacfccd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cem=20G=C3=B6kmen?=
Date: Thu, 21 Mar 2024 12:27:08 -0700
Subject: [PATCH 02/10] Run tests faster
---
.github/workflows/tests.yml | 39 ++++++++++++++++++++++++++++++++++---
1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 8d7620710..b7436f032 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -12,10 +12,25 @@ concurrency:
cancel-in-progress: true
jobs:
- test:
+ run_test:
name: Run Tests
runs-on: [self-hosted, linux, gpu, dataset-enabled]
+ strategy:
+ matrix:
+ test_file:
+ - test_dump_load_states
+ - test_envs
+ - test_object_removal
+ - test_object_states
+ - test_primitives
+ - test_robot_states
+ - test_robot_teleoperation
+ - test_sensors
+ - test_symbolic_primitives
+ - test_systems
+ - test_transition_rules
+
defaults:
run:
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0}
@@ -40,14 +55,32 @@ jobs:
- name: Run tests
working-directory: omnigibson-src
- run: pytest --junitxml=results.xml
+ run: pytest tests/${{ matrix.test_file }}.py --junitxml=${{ matrix.test_file }}.xml && cp ${{ matrix.test_file }}.xml ${GITHUB_WORKSPACE}/
+
+ - name: Deploy artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ github.run_id }}-tests-${{ matrix.test_file }}
+ path: ${{ matrix.test_file }}.xml
+ upload_report:
+ name: Compile Report
+ runs-on: [self-hosted, linux]
+ defaults:
+ run:
+ shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0}
+ needs: [run_test]
+ steps:
+ - name: Pull reports
+ uses: actions/download-artifact@v3
+ with:
+ path: .
- name: Test Report
uses: dorny/test-reporter@v1
with:
name: Test Results
working-directory: omnigibson-src
- path: results.xml
+ path: test_*.xml
reporter: java-junit
fail-on-error: 'true'
fail-on-empty: 'true'
From 7974b0e21b2d80270b04b1d5348d2dba3178e542 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cem=20G=C3=B6kmen?=
Date: Thu, 21 Mar 2024 13:52:52 -0700
Subject: [PATCH 03/10] some fixes to support new test pipeline
---
.github/workflows/tests.yml | 1 -
tests/test_envs.py | 3 ++-
tests/test_primitives.py | 4 ++++
tests/test_symbolic_primitives.py | 3 ++-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index b7436f032..e9fc1fa59 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -79,7 +79,6 @@ jobs:
uses: dorny/test-reporter@v1
with:
name: Test Results
- working-directory: omnigibson-src
path: test_*.xml
reporter: java-junit
fail-on-error: 'true'
diff --git a/tests/test_envs.py b/tests/test_envs.py
index 1cc520fdc..4c2f52445 100644
--- a/tests/test_envs.py
+++ b/tests/test_envs.py
@@ -79,7 +79,8 @@ def test_rs_int_full_load():
}
# Make sure sim is stopped
- og.sim.stop()
+ if og.sim:
+ og.sim.stop()
# Make sure GPU dynamics are enabled (GPU dynamics needed for cloth)
gm.ENABLE_OBJECT_STATES = True
diff --git a/tests/test_primitives.py b/tests/test_primitives.py
index d41219ff3..d7a8c7535 100644
--- a/tests/test_primitives.py
+++ b/tests/test_primitives.py
@@ -10,6 +10,10 @@
from omnigibson.objects.dataset_object import DatasetObject
+# Make sure that Omniverse is launched before setting up the tests.
+og.launch()
+
+
def execute_controller(ctrl_gen, env):
for action in ctrl_gen:
env.step(action)
diff --git a/tests/test_symbolic_primitives.py b/tests/test_symbolic_primitives.py
index 0b595229b..32ad0d394 100644
--- a/tests/test_symbolic_primitives.py
+++ b/tests/test_symbolic_primitives.py
@@ -17,7 +17,8 @@
def start_env():
- og.sim.stop()
+ if og.sim:
+ og.sim.stop()
config = {
"env": {"initial_pos_z_offset": 0.1},
"render": {"viewer_width": 1280, "viewer_height": 720},
From e69135c24b9189908688a6218fe49ee8663b68d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cem=20G=C3=B6kmen?=
Date: Thu, 21 Mar 2024 17:47:43 -0700
Subject: [PATCH 04/10] fix test report builder
---
.github/workflows/tests.yml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index e9fc1fa59..8e71fad1a 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -71,14 +71,20 @@ jobs:
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0}
needs: [run_test]
steps:
+ - name: Checkout source
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+ path: omnigibson-src
- name: Pull reports
uses: actions/download-artifact@v3
with:
- path: .
+ path: omnigibson-src
- name: Test Report
uses: dorny/test-reporter@v1
with:
name: Test Results
+ working-directory: omnigibson-src
path: test_*.xml
reporter: java-junit
fail-on-error: 'true'
From e3b15485c2c0f7b2f1e1360d8bb0cdb85f3bfb46 Mon Sep 17 00:00:00 2001
From: Hang Yin
Date: Tue, 9 Apr 2024 16:36:09 -0700
Subject: [PATCH 05/10] Debug test report problem
---
.github/workflows/tests.yml | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 8e71fad1a..073465e8e 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -20,16 +20,16 @@ jobs:
matrix:
test_file:
- test_dump_load_states
- - test_envs
- - test_object_removal
- - test_object_states
- - test_primitives
- - test_robot_states
- - test_robot_teleoperation
- - test_sensors
- - test_symbolic_primitives
- - test_systems
- - test_transition_rules
+ # - test_envs
+ # - test_object_removal
+ # - test_object_states
+ # - test_primitives
+ # - test_robot_states
+ # - test_robot_teleoperation
+ # - test_sensors
+ # - test_symbolic_primitives
+ # - test_systems
+ # - test_transition_rules
defaults:
run:
@@ -80,7 +80,9 @@ jobs:
uses: actions/download-artifact@v3
with:
path: omnigibson-src
- - name: Test Report
+ - name: List downloaded files
+ run: ls -la omnigibson-src/
+ - name: Test Report0
uses: dorny/test-reporter@v1
with:
name: Test Results
From 123a9c4b3b098d602f0ff4fbf25341b237ad40ec Mon Sep 17 00:00:00 2001
From: Hang Yin
Date: Tue, 9 Apr 2024 16:51:25 -0700
Subject: [PATCH 06/10] Remove global config
---
setup.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/setup.py b/setup.py
index 84ca46dbe..7bc82c624 100644
--- a/setup.py
+++ b/setup.py
@@ -48,6 +48,5 @@
],
tests_require=[],
python_requires=">=3",
- package_data={"": ["omnigibson/global_config.yaml"]},
include_package_data=True,
) # yapf: disable
From 3217d4f591fa34f633c747806417cc295e0f9092 Mon Sep 17 00:00:00 2001
From: Hang Yin
Date: Wed, 10 Apr 2024 09:37:19 -0700
Subject: [PATCH 07/10] More debugging
---
.github/workflows/tests.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 073465e8e..787d51c0b 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -56,6 +56,12 @@ jobs:
- name: Run tests
working-directory: omnigibson-src
run: pytest tests/${{ matrix.test_file }}.py --junitxml=${{ matrix.test_file }}.xml && cp ${{ matrix.test_file }}.xml ${GITHUB_WORKSPACE}/
+
+ - name: List files
+ run: ls -la ${GITHUB_WORKSPACE}
+
+ - name: Print GITHUB_WORKSPACE
+ run: echo $GITHUB_WORKSPACE
- name: Deploy artifact
uses: actions/upload-artifact@v3
From e75e26f1647462a9dd14621540797cb3ec66a60a Mon Sep 17 00:00:00 2001
From: Hang Yin
Date: Wed, 10 Apr 2024 09:48:47 -0700
Subject: [PATCH 08/10] Rename test report reference
---
.github/workflows/tests.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 787d51c0b..1a31f3975 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -93,7 +93,7 @@ jobs:
with:
name: Test Results
working-directory: omnigibson-src
- path: test_*.xml
+ path: ${{ github.run_id }}-tests-*
reporter: java-junit
fail-on-error: 'true'
fail-on-empty: 'true'
From 08d33ae144acea6d2aa31f3ad55b90bb988dcac0 Mon Sep 17 00:00:00 2001
From: Hang Yin
Date: Wed, 10 Apr 2024 10:13:55 -0700
Subject: [PATCH 09/10] Minor adjustment
---
.github/workflows/tests.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 1a31f3975..1c4971a29 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -93,7 +93,7 @@ jobs:
with:
name: Test Results
working-directory: omnigibson-src
- path: ${{ github.run_id }}-tests-*
+ path: ${{ github.run_id }}-tests-*/test_*.xml
reporter: java-junit
fail-on-error: 'true'
fail-on-empty: 'true'
From 6c6a357b78390120ddffe903ef01c863df0d6e33 Mon Sep 17 00:00:00 2001
From: Hang Yin
Date: Wed, 10 Apr 2024 10:26:29 -0700
Subject: [PATCH 10/10] Enable all tests
---
.github/workflows/tests.yml | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 1c4971a29..6f45db796 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -20,16 +20,16 @@ jobs:
matrix:
test_file:
- test_dump_load_states
- # - test_envs
- # - test_object_removal
- # - test_object_states
- # - test_primitives
- # - test_robot_states
- # - test_robot_teleoperation
- # - test_sensors
- # - test_symbolic_primitives
- # - test_systems
- # - test_transition_rules
+ - test_envs
+ - test_object_removal
+ - test_object_states
+ - test_primitives
+ - test_robot_states
+ - test_robot_teleoperation
+ - test_sensors
+ - test_symbolic_primitives
+ - test_systems
+ - test_transition_rules
defaults:
run:
@@ -56,12 +56,6 @@ jobs:
- name: Run tests
working-directory: omnigibson-src
run: pytest tests/${{ matrix.test_file }}.py --junitxml=${{ matrix.test_file }}.xml && cp ${{ matrix.test_file }}.xml ${GITHUB_WORKSPACE}/
-
- - name: List files
- run: ls -la ${GITHUB_WORKSPACE}
-
- - name: Print GITHUB_WORKSPACE
- run: echo $GITHUB_WORKSPACE
- name: Deploy artifact
uses: actions/upload-artifact@v3
@@ -86,8 +80,6 @@ jobs:
uses: actions/download-artifact@v3
with:
path: omnigibson-src
- - name: List downloaded files
- run: ls -la omnigibson-src/
- name: Test Report0
uses: dorny/test-reporter@v1
with: