-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Integration Test in Tutor | ||
description: 'A Github action to test your plugin in Tutor (Open edX distribution)' | ||
inputs: | ||
app_name: | ||
description: 'Application name to test. E.g., eox-tenant.' | ||
required: true | ||
tutor_version: | ||
description: 'The tutor version matrix to use.' | ||
required: false | ||
shell_file_to_run: | ||
description: 'The path of the shell file to run the integration tests.' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Run integration test in Tutor | ||
run: | | ||
echo "##[group]Prepare Tutor and Launch" | ||
pip install "tutor$INPUT_TUTOR_VERSION" | ||
TUTOR_ROOT="$(pwd)" tutor --version | ||
TUTOR_ROOT="$(pwd)" tutor config save | ||
TUTOR_ROOT="$(pwd)" tutor mounts add lms,cms,lms-worker,cms-worker:$(pwd)/$INPUT_PATH:/openedx/$INPUT_PATH | ||
chmod 777 . -R | ||
TUTOR_ROOT="$(pwd)" tutor local launch -I | ||
echo "##[endgroup]" | ||
# Check if shell file is set and not empty | ||
if [ -n $INPUT_SHELL_FILE ]; then | ||
echo "##[group]Run integration tests in lms" | ||
TUTOR_ROOT="$(pwd)" tutor local run lms bash $INPUT_SHELL_FILE | ||
echo "##[endgroup]" | ||
fi | ||
shell: bash | ||
env: | ||
INPUT_PATH: ${{ inputs.app_name }} | ||
INPUT_TUTOR_VERSION: ${{ inputs.tutor_version }} | ||
INPUT_SHELL_FILE: /openedx/${{ inputs.app_name }}/${{ inputs.shell_file_to_run }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters