-
Notifications
You must be signed in to change notification settings - Fork 97
55 lines (44 loc) · 1.68 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ['py38', 'py312']
django-version: ['django42']
db-version: ['mysql80']
steps:
- uses: actions/checkout@v2
- name: Start container
run: |
docker-compose -f .github/docker-compose-ci.yml up -d
- name: setup python
if: ${{ matrix.python-version == 'py312' }}
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} -e DB_HOST=${{ matrix.db-version }} xqueue bash -c \
"apt update && apt install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa -y && apt install python3.12 python3.12-dev python3.12-distutils -y"
- name: Install test dependencies and run tests
env:
TOXENV: ${{ matrix.python-version }}-${{ matrix.django-version }}
run: |
docker exec xqueue bash -c "cd /edx/app/xqueue/xqueue/; pip3 install -r requirements/ci.txt"
docker exec xqueue bash -c "cd /edx/app/xqueue/xqueue/ && DB_HOST=${{ matrix.db-version }} tox -e ${TOXENV}"
quality:
runs-on: ubuntu-20.04
env:
db-version: mysql80
steps:
- uses: actions/checkout@v2
- name: Start container
run: |
docker-compose -f .github/docker-compose-ci.yml up -d
- name: Install test dependencies and run quality tests
run: |
docker exec xqueue bash -c "cd /edx/app/xqueue/xqueue/; pip3 install -r requirements/ci.txt"
docker exec xqueue bash -c "cd /edx/app/xqueue/xqueue/ && DB_HOST=${{ env.db-version }} tox -e quality"