-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.7 KB
/
test.yml
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
name: Tutor Open edX CI
on: [push]
jobs:
setup-tutor:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip curl
pip3 install tutor
- name: Configure Tutor plugin
run: |
tutor config save
echo 'Patching Caddyfile...'
echo "
{$default_site_port} {
@favicon_matcher {
path_regexp ^/favicon.ico$
}
rewrite @favicon_matcher /theming/asset/images/favicon.ico
{{ patch('caddyfile-mfe-by-path') }}
# Limit profile image upload size
request_body /api/profile_images/*/*/upload {
max_size 1MB
}
request_body {
max_size 4MB
}
import proxy 'lms:8000'
}
" > $(tutor config printroot)/env/apps/caddy/Caddyfile
echo 'Patching CMS production settings...'
echo "ALLOWED_HOSTS = ['*']" > $(tutor config printroot)/env/apps/openedx/settings/cms/production.py
echo 'Patching LMS production settings...'
echo "ALLOWED_HOSTS = ['*']" > $(tutor config printroot)/env/apps/openedx/settings/lms/production.py
- name: Launch Tutor
run: |
tutor config save
tutor local launch -I
- name: Check Open edX LMS heartbeat
run: |
until curl -sSf http://localhost:8000/heartbeat; do
echo "Waiting for LMS to be ready..."
sleep 5
done
echo "LMS is up and running!"