-
Notifications
You must be signed in to change notification settings - Fork 11
64 lines (54 loc) · 1.8 KB
/
integration-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Integration Test
on:
schedule:
# Montlhy at 00:00
- cron: '0 0 1 * *'
jobs:
edx-platform-integration-test:
name: Integration with Tutor
strategy:
matrix:
# Open edX Version: Sumac
tutor_version: ["<20.0.0"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: mitx-grading-library
- name: Adjust permissions to execute Tutor commands
run: |
chmod 777 . -R
shell: bash
- name: Set Tutor environment variables
run: |
cat <<EOF >> "$GITHUB_ENV"
LMS_HOST=local.edly.io
CMS_HOST=studio.local.edly.io
TUTOR_ROOT=$(pwd)
COURSE_KEY=course-v1:MITx+grading-library+course
EOF
shell: bash
- name: Install Tutor
run: pip install "tutor${{ matrix.tutor_version }}"
shell: bash
- name: Install, enable and initialize Tutor Codejail Plugin
run: |
pip install git+https://github.com/edunext/tutor-contrib-codejail
tutor plugins enable codejail
tutor local do init --limit codejail
shell: bash
- name: Mount Integration Test
run: tutor mounts add cms:mitx-grading-library/integration_tests/integration_test.py:/openedx/edx-platform/integration_test.py
shell: bash
- name: Launch Tutor
run: tutor local launch -I
shell: bash
- name: Import MITx Demo Course
run: |
tutor local do importdemocourse -r ${{ github.event.pull_request.head.repo.clone_url }} -d course -v ${{ github.event.pull_request.head.ref }}
shell: bash
- name: Run integration tests
run: |
tutor local run cms python integration_test.py "$COURSE_KEY"
shell: bash