forked from jazkarta/obsolete-edx-sga
-
Notifications
You must be signed in to change notification settings - Fork 113
84 lines (72 loc) · 2.49 KB
/
ci.yml
File metadata and controls
84 lines (72 loc) · 2.49 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
branches: [master]
pull_request:
branches:
- '**'
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
python-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
python-version: ['3.12']
edx_branch: ['master', 'open-release/sumac.master', 'release/teak']
toxenv: [py312-django42, py312-django52]
steps:
- uses: actions/checkout@v4
- name: Python setup
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: tox install
run: pip install tox
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Upload coverage to CodeCov
if: matrix.python-version == '3.12' && matrix.toxenv == 'py312-django42'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
- name: Install tutor
run: |
if [[ "${{ matrix.edx_branch }}" == "open-release/sumac.master" ]]; then
pip install "tutor>=19.0.0,<20.0.0"
elif [[ "${{ matrix.edx_branch }}" == "master" ]]; then
git clone --branch=main https://github.com/overhangio/tutor.git
pip install -e "./tutor"
else
pip install "tutor>=20.0.0,<21.0.0"
fi
- name: Set up tutor with edx-platform
run: |
cd ..
git clone https://github.com/openedx/edx-platform
cd edx-platform
git checkout ${{ matrix.edx_branch }}
tutor mounts add .
tutor dev launch --non-interactive
tutor dev stop
- name: Run Integration Tests
run: |
if [[ "${{ matrix.edx_branch }}" == "master" ]]; then
DIRECTORY="tutor-main"
DEV="tutor_main_dev"
else
DIRECTORY="tutor"
DEV="tutor_dev"
fi
EDX_WORKSPACE=$PWD/.. docker compose -f /home/runner/.local/share/$DIRECTORY/env/local/docker-compose.yml -f /home/runner/.local/share/$DIRECTORY/env/dev/docker-compose.yml --project-name $DEV run -v $PWD/../edx-sga:/edx-sga lms /edx-sga/run_edx_integration_tests.sh
- name: Upload coverage to CodeCov
if: matrix.python-version == '3.12' && matrix.toxenv == 'py312-django42'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false