From 67a46f30b399af937004805dc061bc6e7c990fcf Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 11:59:07 +0200 Subject: [PATCH 01/10] add tests workflow --- .github/workflows/tests.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..836bc52 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: run tests + +on: + push: + branches: + - master + - workflow # for testing only + + pull_request: + branches: + - master + +jobs: + run-tests: + name: Test random policy + runs-on: ubuntu-20.04 + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 # You can use 'setup-conda' if needed + with: + activate-environment: imitation # Replace with your Conda environment name + environment-file: conda_environment.yaml # Specify the environment file if you have one + + + - name: Run test.py + run: | + source activate imitation + python test.py --config-name=test_random_policy \ No newline at end of file From d52938c86919305e4711092404665826a3317c22 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 12:09:52 +0200 Subject: [PATCH 02/10] fix conda activate --- .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 836bc52..4af7c40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,5 +28,5 @@ jobs: - name: Run test.py run: | - source activate imitation + conda activate imitation python test.py --config-name=test_random_policy \ No newline at end of file From 2a86204506c450f46fce5d154b06d3eae5703442 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 12:38:15 +0200 Subject: [PATCH 03/10] add conda init --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4af7c40..a248cae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,5 +28,6 @@ jobs: - name: Run test.py run: | + conda init bash conda activate imitation python test.py --config-name=test_random_policy \ No newline at end of file From 8c1f5dc6be98e868068f35bd8ad998b4df39e8a8 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 16:34:20 +0200 Subject: [PATCH 04/10] init conda for all shells --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a248cae..1f08a02 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,9 +25,10 @@ jobs: activate-environment: imitation # Replace with your Conda environment name environment-file: conda_environment.yaml # Specify the environment file if you have one + - name: Initialize Conda (non-interactive) + run: conda init --all -v # Use the '--all' flag to initialize all shells - name: Run test.py run: | - conda init bash conda activate imitation python test.py --config-name=test_random_policy \ No newline at end of file From 8cb3cec3c8b4a4ca56d27c35ef932080286b8c19 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 16:36:47 +0200 Subject: [PATCH 05/10] add cache for conda env --- .github/workflows/tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1f08a02..76492f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,6 +19,15 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 + # cache Conda packages to speed up workflow + - name: Cache Conda packages + uses: actions/cache@v2 + with: + path: ~/.conda/pkgs + key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }} + restore-keys: | + conda-${{ runner.os }}- + - name: Set up Conda uses: conda-incubator/setup-miniconda@v2 # You can use 'setup-conda' if needed with: From f1d4db5412b2146b5d0809f200995981e2953393 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 16:45:25 +0200 Subject: [PATCH 06/10] change to source activate --- .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 76492f7..49b2563 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,5 +39,5 @@ jobs: - name: Run test.py run: | - conda activate imitation + source activate imitation python test.py --config-name=test_random_policy \ No newline at end of file From 7450d083bce82bde762a53dac96350883da672d8 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 22 Aug 2023 17:05:05 +0200 Subject: [PATCH 07/10] activate conda and run in same line --- .github/workflows/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 49b2563..b07db95 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,6 +38,4 @@ jobs: run: conda init --all -v # Use the '--all' flag to initialize all shells - name: Run test.py - run: | - source activate imitation - python test.py --config-name=test_random_policy \ No newline at end of file + run: conda run -n imitation python test.py --config-name=test_random_policy \ No newline at end of file From f66f4fe3e7c1973d5dcfc7d0e0698df0465688a9 Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 10 Oct 2023 22:03:19 +0200 Subject: [PATCH 08/10] setup robosuite macros --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b07db95..effcc21 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,5 +37,8 @@ jobs: - name: Initialize Conda (non-interactive) run: conda init --all -v # Use the '--all' flag to initialize all shells + - name: Setup robosuite macros + run: python ~/work/GraphDiffusionImitate/GraphDiffusionImitate/src/robosuite/robosuite/scripts/setup_macros.py + - name: Run test.py run: conda run -n imitation python test.py --config-name=test_random_policy \ No newline at end of file From fe170daf79a71adf9647d83acb84c7068480102d Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 10 Oct 2023 22:12:55 +0200 Subject: [PATCH 09/10] fix robosuite macros activation --- .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 effcc21..8ce06b9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: run: conda init --all -v # Use the '--all' flag to initialize all shells - name: Setup robosuite macros - run: python ~/work/GraphDiffusionImitate/GraphDiffusionImitate/src/robosuite/robosuite/scripts/setup_macros.py + run: conda activate imitation & python ~/work/GraphDiffusionImitate/GraphDiffusionImitate/src/robosuite/robosuite/scripts/setup_macros.py - name: Run test.py run: conda run -n imitation python test.py --config-name=test_random_policy \ No newline at end of file From 77660af6c3d85daed42320fcc974257bf4f17fff Mon Sep 17 00:00:00 2001 From: Caio Freitas Date: Tue, 10 Oct 2023 22:26:03 +0200 Subject: [PATCH 10/10] again --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ce06b9..4c90a68 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: run: conda init --all -v # Use the '--all' flag to initialize all shells - name: Setup robosuite macros - run: conda activate imitation & python ~/work/GraphDiffusionImitate/GraphDiffusionImitate/src/robosuite/robosuite/scripts/setup_macros.py + run: conda init --all -v & conda activate imitation & python ~/work/GraphDiffusionImitate/GraphDiffusionImitate/src/robosuite/robosuite/scripts/setup_macros.py - name: Run test.py - run: conda run -n imitation python test.py --config-name=test_random_policy \ No newline at end of file + run: conda init --all -v & conda run -n imitation python test.py --config-name=test_random_policy \ No newline at end of file