From d0533a48def34eec48c0f8dfc951492be176b6b6 Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Thu, 30 May 2024 18:42:40 -0500 Subject: [PATCH 1/6] feat: add github action integration --- .github/workflows/integration-test.yml | 18 ++++++++++++++++++ eox_core/tests/tutor/integration.sh | 13 +++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/integration-test.yml create mode 100644 eox_core/tests/tutor/integration.sh diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 000000000..61ac14bfc --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,18 @@ +name: Integration +on: [pull_request] + +jobs: + integration-test: + runs-on: ubuntu-latest + strategy: + matrix: + tutor_version: ["<17.0.0", "<18.0.0"] + steps: + - uses: actions/checkout@v4 + with: + path: eox-core + - uses: eduNEXT/integration-test-in-tutor + with: + tutor_version: ${{ matrix.tutor_version }} + app_name: "eox-core" + shell_file_to_run: "eox_core/tests/tutor/integration.sh" diff --git a/eox_core/tests/tutor/integration.sh b/eox_core/tests/tutor/integration.sh new file mode 100644 index 000000000..6916975f0 --- /dev/null +++ b/eox_core/tests/tutor/integration.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Install the package in the edxapp env +echo "Install package" +pip install -e ../eox-core + +# Install test requirements from openedx +echo "Install test-requirements" +make test-requirements + +# Running the tests using the tutor settings +echo "Run tests" +pytest -s --ds=lms.envs.tutor.test /openedx/eox-core/eox_core/tests/tutor From c6546b732373dd5bdbb60a6ddac39cf4d14a3495 Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Thu, 30 May 2024 19:15:04 -0500 Subject: [PATCH 2/6] feat: add github action integration --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 61ac14bfc..fdda63390 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 with: path: eox-core - - uses: eduNEXT/integration-test-in-tutor + - uses: eduNEXT/integration-test-in-tutor@main with: tutor_version: ${{ matrix.tutor_version }} app_name: "eox-core" From 94212eb53665e3ae5819f69c0584113309e165e8 Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Tue, 4 Jun 2024 01:44:18 -0500 Subject: [PATCH 3/6] fix: quality changes --- .github/workflows/integration-test.yml | 2 +- eox_core/tests/tutor/integration.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index fdda63390..809109e7c 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -1,4 +1,4 @@ -name: Integration +name: Tutor Integration Tests on: [pull_request] jobs: diff --git a/eox_core/tests/tutor/integration.sh b/eox_core/tests/tutor/integration.sh index 6916975f0..e48c143ac 100644 --- a/eox_core/tests/tutor/integration.sh +++ b/eox_core/tests/tutor/integration.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Install the package in the edxapp env +# This script installs the package in the edxapp environment, installs test requirements from Open edX and runs the tests using the Tutor settings. echo "Install package" pip install -e ../eox-core -# Install test requirements from openedx echo "Install test-requirements" make test-requirements -# Running the tests using the tutor settings echo "Run tests" pytest -s --ds=lms.envs.tutor.test /openedx/eox-core/eox_core/tests/tutor From 08a7de816a85f58550708ced73dc344e85bd1bf9 Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Wed, 5 Jun 2024 18:40:35 -0500 Subject: [PATCH 4/6] fix: quality changes --- eox_core/tests/tutor/integration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eox_core/tests/tutor/integration.sh b/eox_core/tests/tutor/integration.sh index e48c143ac..05308459b 100644 --- a/eox_core/tests/tutor/integration.sh +++ b/eox_core/tests/tutor/integration.sh @@ -2,7 +2,7 @@ # This script installs the package in the edxapp environment, installs test requirements from Open edX and runs the tests using the Tutor settings. echo "Install package" -pip install -e ../eox-core +pip install -e /openedx/eox-core echo "Install test-requirements" make test-requirements From 0ba106b1ad0accc26c47c136858905f83bdd36b4 Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Thu, 6 Jun 2024 18:13:40 -0500 Subject: [PATCH 5/6] fix: quality changes --- .github/workflows/integration-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 809109e7c..baa3c4334 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -3,6 +3,7 @@ on: [pull_request] jobs: integration-test: + name: Tutor Integration Tests runs-on: ubuntu-latest strategy: matrix: From 2cd3fd3f4348c58cb993f3f8c6ebd3c9342eac0e Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Fri, 7 Jun 2024 11:01:24 -0500 Subject: [PATCH 6/6] fix: add migrations --- eox_core/tests/tutor/integration.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eox_core/tests/tutor/integration.sh b/eox_core/tests/tutor/integration.sh index 05308459b..c3e366ebc 100644 --- a/eox_core/tests/tutor/integration.sh +++ b/eox_core/tests/tutor/integration.sh @@ -3,6 +3,8 @@ # This script installs the package in the edxapp environment, installs test requirements from Open edX and runs the tests using the Tutor settings. echo "Install package" pip install -e /openedx/eox-core +python manage.py lms makemigrations +python manage.py lms migrate echo "Install test-requirements" make test-requirements