From b94a879be692cb871d1275d3da34ae1e1d4919a3 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Thu, 5 Oct 2023 16:26:59 +0000 Subject: [PATCH 01/13] add functional tests and all tests jobs to ci --- .github/workflows/unit_test.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 02e22ff..c2ebb00 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -11,4 +11,20 @@ jobs: - uses: actions/checkout@v2 - run: | cd test/unit - python -m unittest test_utils \ No newline at end of file + python -m unittest test_utils + run_func_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + cd test/func + bash test_search.sh + run_all_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + cd test/unit + python -m unittest test_utils + cd ../func + bash test_search.sh \ No newline at end of file From 2762fc52aca112789e61857b5d61a856bbc2cabf Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:07:16 +0000 Subject: [PATCH 02/13] add import --- search.py | 1 + 1 file changed, 1 insertion(+) diff --git a/search.py b/search.py index ebf90d7..1c8debe 100644 --- a/search.py +++ b/search.py @@ -2,6 +2,7 @@ import random import time import utils +import numpy as np def get_args(): From aac350136b6988b7c69a2a11ff4f9fb3c7952ff4 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:09:28 +0000 Subject: [PATCH 03/13] use pip to fix --- .github/workflows/unit_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index c2ebb00..acd85dd 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -17,6 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - run: | + pip install numpy cd test/func bash test_search.sh run_all_tests: @@ -27,4 +28,4 @@ jobs: cd test/unit python -m unittest test_utils cd ../func - bash test_search.sh \ No newline at end of file + bash test_search.sh From 0ec9dc5b88380d7fb75b5da88cdc2199ef7b442f Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:36:57 +0000 Subject: [PATCH 04/13] use conda --- .github/workflows/unit_test.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index acd85dd..4ea572d 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -5,21 +5,29 @@ on: branches: [ main ] jobs: + defaults: + run: + shell: bash -el {0} + run_unit_tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: | cd test/unit - python -m unittest test_utils + python -m unittest test_utils + run_func_tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + environment-file: environment.yml - run: | - pip install numpy cd test/func bash test_search.sh + run_all_tests: runs-on: ubuntu-latest steps: From 66859aa89a871546883b45c1d9557c5e8a2eb618 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:37:27 +0000 Subject: [PATCH 05/13] add env file --- environment.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 environment.yml diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..1cf2cfa --- /dev/null +++ b/environment.yml @@ -0,0 +1,6 @@ +name: swe4s +channels: + - conda-forge +dependencies: + - pycodestyle +prefix: /home/jovyan/.conda/envs/swe4s From 81fc930990691153b938accd05a28c974217f901 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:40:15 +0000 Subject: [PATCH 06/13] bug fix --- .github/workflows/unit_test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 4ea572d..6d0e51e 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -5,12 +5,14 @@ on: branches: [ main ] jobs: - defaults: - run: - shell: bash -el {0} + run_unit_tests: runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + steps: - uses: actions/checkout@v2 - run: | From c5bda2bda967f9b7116c46a26184a864d48a715f Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:42:14 +0000 Subject: [PATCH 07/13] bug fix 2 --- .github/workflows/unit_test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 6d0e51e..a1db9c8 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -4,14 +4,12 @@ on: pull_request: branches: [ main ] -jobs: - - +jobs: run_unit_tests: runs-on: ubuntu-latest defaults: - run: - shell: bash -el {0} + run: + shell: bash -el {0} steps: - uses: actions/checkout@v2 From ff001922a239094d0b750eeadf3344f94e9fff5d Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:46:51 +0000 Subject: [PATCH 08/13] try mamba and numpy --- .github/workflows/unit_test.yml | 3 +++ environment.yml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index a1db9c8..3a659a1 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -32,6 +32,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: mamba-org/provision-with-micromamba@v16 + with: + environment-file: environment.yml - run: | cd test/unit python -m unittest test_utils diff --git a/environment.yml b/environment.yml index 1cf2cfa..2147326 100644 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,5 @@ -name: swe4s channels: - conda-forge dependencies: - pycodestyle -prefix: /home/jovyan/.conda/envs/swe4s + - numpy From 42dd5a16dbc7d4149efe6e9797da0cda68f712e4 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:49:40 +0000 Subject: [PATCH 09/13] bug fix 3 --- .github/workflows/unit_test.yml | 4 +++- environment.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 3a659a1..b4b2d4b 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -24,6 +24,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: environment-file: environment.yml + activate-environment: swe4s - run: | cd test/func bash test_search.sh @@ -32,9 +33,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: mamba-org/provision-with-micromamba@v16 + - uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml + environment-name: swe4s - run: | cd test/unit python -m unittest test_utils diff --git a/environment.yml b/environment.yml index 2147326..907695e 100644 --- a/environment.yml +++ b/environment.yml @@ -1,3 +1,4 @@ +name: swe4s channels: - conda-forge dependencies: From 5ed78014073b7c6cd904cb1800716a642ac1f6fb Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:56:33 -0600 Subject: [PATCH 10/13] Update unit_test.yml --- .github/workflows/unit_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index b4b2d4b..5830e9b 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -37,6 +37,7 @@ jobs: with: environment-file: environment.yml environment-name: swe4s + - shell: shell: bash -el {0} - run: | cd test/unit python -m unittest test_utils From fa0fab8a1f7fd9669957892da5d34098ae2f38e0 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:57:16 -0600 Subject: [PATCH 11/13] Update unit_test.yml --- .github/workflows/unit_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 5830e9b..e86d421 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -37,7 +37,7 @@ jobs: with: environment-file: environment.yml environment-name: swe4s - - shell: shell: bash -el {0} + - shell: bash -el {0} - run: | cd test/unit python -m unittest test_utils From feb9b5879a72c80cac3e002949c7b939eb9a23c4 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 16:58:25 -0600 Subject: [PATCH 12/13] Update unit_test.yml --- .github/workflows/unit_test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index e86d421..80f189f 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -31,13 +31,15 @@ jobs: run_all_tests: runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} steps: - uses: actions/checkout@v2 - uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml environment-name: swe4s - - shell: bash -el {0} - run: | cd test/unit python -m unittest test_utils From 939d343e1d0a7b712bc97c0ecd1d225ec3964ef1 Mon Sep 17 00:00:00 2001 From: Ryan Layer Date: Tue, 10 Oct 2023 17:00:16 -0600 Subject: [PATCH 13/13] Update unit_test.yml --- .github/workflows/unit_test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 80f189f..e00b113 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -7,10 +7,6 @@ on: jobs: run_unit_tests: runs-on: ubuntu-latest - defaults: - run: - shell: bash -el {0} - steps: - uses: actions/checkout@v2 - run: | @@ -19,6 +15,9 @@ jobs: run_func_tests: runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2