-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: run integration tests outside LMS container #4
Conversation
43ba8c0
to
89cac69
Compare
60e82aa
to
a016821
Compare
Note to reviewers: I'm working on updating the README |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magajh, This looks great! thank you!
Just to note, when adding these changes we must modify all eox's that use this action, as the commands in your scripts will not work.
Co-authored-by: Bryann Valderrama <[email protected]>
@mariajgrimaldi @BryanttV: thank you for your valuable feedback! I've addressed all the comments and this is ready for review again. I think the only pending discussion that we have is #4 (comment) |
README.md
Outdated
### `openedx_imports_test_file_path` | ||
|
||
**Optional** | ||
The path to the Python file in your plugin that contains the test function for validating Open edX imports. This path is relative to your plugin directory. | ||
*Example*: `"tests/import_tests.py"` | ||
|
||
### `openedx_imports_test_function_name` | ||
|
||
**Optional** | ||
The name of the function in the specified file that executes the import tests for Open edX. | ||
*Example*: `"test_openedx_imports"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @magajh. I agree with Majo's question. Also, do you happen to have any log for the jobs that shows what it looks like when some backend fails?
Co-authored-by: Bryann Valderrama <[email protected]>
c7e49bf
to
aba7551
Compare
86bec38
to
935eafe
Compare
444dfbc
to
b27df97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you very much for addressing our comments!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
Overview
This PR introduces significant modifications to the GitHub Action for testing Open edX plugins in the Tutor environment. These changes are necessary for improving the effectiveness and reliability of our integration tests
Motivation for Changes
The initial implementation ran integration tests inside the LMS container of Tutor. This approach created several challenges:
To address these issues, this PR modifies the workflow to run integration tests outside the Tutor container, improving the testing environment and results.
Workflow Steps and Their Necessity
Set Tutor Environment Variables:
LMS_HOST
,CMS_HOST
,TUTOR_ROOT
, andTUTOR_PLUGINS_ROOT
for proper Tutor configuration.Install and Prepare Tutor:
nightly
branch iftutor_version
is set to"nightly"
.Configure Caddyfile and Open edX Settings:
patches.yml
into the action directory and copies it into theplugins
directory during the workflow.patches
plugin to customize the Caddyfile and Open edX production settings. This configuration allows for the necessary routing for testing with multiple sites and security settings for our tests.Add Mount for Plugin:
Restart Tutor Services:
Install Plugin and Extra Requirements:
openedx_extra_pip_requirements
in both LMS and CMS containers.Run Migrations:
Import Demo Course:
Set
DEMO_COURSE_ID
Environment Variable:Load Initial Data for the Tests (Optional):
fixtures_file
is provided.Curl Heartbeat:
Run Integration Tests:
Personalization Options
The workflow includes several inputs that can be customized:
app_name
: The name of the application to test (e.g.,eox-core
).tutor_version
: The version of Tutor to use, allowing for testing against specific versions or thenightly
build.shell_file_to_run
: The path to the shell script that contains the integration tests.openedx_extra_pip_requirements
: Optional additional dependencies needed for testing.fixtures_file
: Optional path to a JSON file containing initial data to load for the tests.openedx_imports_test_file_path
: Optional path to the Python file containing the import test function.openedx_imports_test_function_name
: Optional name of the function to execute in the import test file.Testing the Workflow
To test this workflow:
Create a Branch:
bav/add-integration-tests
ineox-core
, which includes several integration tests.Add Integration Test Script:
Include a shell script (e.g.,
integration.sh
) in your plugin that installs dependencies and runs the tests.Configure the Workflow:
Update your workflow file to use the updated action and specify the required inputs.
Verify the Tests Run Successfully:
Additional Notes
Supporting Tutor Nightly:
nightly
version of Tutor, enabling early detection of compatibility issues with upcoming changes.Improved Documentation:
nightly
version.