-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (83 loc) · 3 KB
/
integration-tests.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Integration Tests
on:
pull_request:
push:
branches: [main]
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tests:
name: ${{ matrix.edx-platform.branch }} (${{ matrix.edx-platform.release }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
edx-platform:
- branch: opencraft-release/nutmeg.2
remote: open-craft
release: nutmeg
- branch: master
remote: openedx
release: master
env:
EDX_PLATFORM_PATH: ./edx/app/edxapp/edx-platform
SECTION_TO_COURSE_PATH: ./edx/src/section-to-course
steps:
- name: Create directory structure
run: mkdir -p ${{ env.EDX_PLATFORM_PATH }} ${{ env.SECTION_TO_COURSE_PATH }}
- name: Checkout edx-platform repository
uses: actions/checkout@v3
with:
repository: ${{ matrix.edx-platform.remote }}/edx-platform
ref: ${{ matrix.edx-platform.branch }}
path: ${{ env.EDX_PLATFORM_PATH }}
- name: install edx-platform required packages
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev lynx
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 4.4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Get pip cache dir
id: pip-cache-dir
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install edx-platform required Python dependencies
env:
PIP_SRC: ${{ runner.temp }}
working-directory: ${{ env.EDX_PLATFORM_PATH }}
run: |
if [[ "${{ matrix.edx-platform.release }}" == "nutmeg" ]]; then
pip install -r requirements/pip.txt
pip install -r requirements/edx/development.txt --src ${{ runner.temp }}
else
make test-requirements
fi
- name: Checkout section-to-course repo
uses: actions/checkout@v3
with:
path: ${{ env.SECTION_TO_COURSE_PATH }}
- name: Install section-to-course
working-directory: ${{ env.SECTION_TO_COURSE_PATH }}
run: pip install -e .
- name: Run section-to-course integration tests
working-directory: ${{ env.SECTION_TO_COURSE_PATH }}
run: make test_integration
- name: Run coverage
if: matrix.edx-platform.branch == 'opencraft-release/nutmeg.2'
uses: codecov/codecov-action@v3
with:
working-directory: ${{ env.SECTION_TO_COURSE_PATH }}
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
fail_ci_if_error: true