-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (63 loc) · 2.1 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
---
name: CI
on: [push]
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python_version:
- 3.8
- 3.11
edx_branch:
- master
- open-release/quince.master
- open-release/redwood.master
# Add more branches as needed
steps:
- uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Set up Pants
run: |
# Install Pants
export PATH=$PATH:/root/.local/bin
curl --proto '=https' --tlsv1.2 -fsSL https://static.pantsbuild.org/setup/get-pants.sh | bash
pants package ::
- name: Install tutor
run: |
if [[ "${{ matrix.edx_branch }}" == "open-release/quince.master" ]]; then
pip install tutor==17.0.6
elif [[ "${{ matrix.edx_branch }}" == "master" ]]; then
git clone --branch=nightly https://github.com/overhangio/tutor.git
pip install -e "./tutor"
else
pip install tutor==18.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 images build openedx-dev
tutor dev launch --non-interactive
tutor dev stop
- name: Run tests on tutor
run: |
if [[ "${{ matrix.edx_branch }}" == "master" ]]; then
DIRECTORY="tutor-nightly"
DEV="tutor_nightly_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/../open-edx-plugins:/open-edx-plugins lms /open-edx-plugins/run_devstack_integration_tests.sh
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false