From b1bc5954e2a0936476f1fcd54dfb2d0edcc17e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Felipe=20Casta=C3=B1o?= <78836902+luisfelipec95@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:31:01 -0500 Subject: [PATCH] feat: add github action integration (#270) * feat: add github action integration --- .github/workflows/integration-test.yml | 19 +++++++++++++++++++ eox_core/tests/tutor/integration.sh | 13 +++++++++++++ 2 files changed, 32 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..baa3c4334 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,19 @@ +name: Tutor Integration Tests +on: [pull_request] + +jobs: + integration-test: + name: Tutor Integration Tests + 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@main + 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..c3e366ebc --- /dev/null +++ b/eox_core/tests/tutor/integration.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# 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 + +echo "Run tests" +pytest -s --ds=lms.envs.tutor.test /openedx/eox-core/eox_core/tests/tutor