-
Notifications
You must be signed in to change notification settings - Fork 11
59 lines (52 loc) · 1.59 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
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches:
- '**'
jobs:
run_tests:
name: tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # Add macos-latest later?
python-version: ['3.8', '3.11', '3.12']
toxenv: ["django42", "package", "quality"]
# We're only testing against MySQL 8 right now because 5.7 is
# incompatible with Djagno 4.2. We'd have to make the tox.ini file more
# complicated than it's worth given the short expected shelf-life of
# MySQL 5.7 in our stack.
mysql-version: ["8"]
services:
mysql:
image: mysql:${{ matrix.mysql-version }}
ports:
- 3306:3306
env:
MYSQL_DATABASE: "test_oel_db"
MYSQL_USER: "test_oel_user"
MYSQL_PASSWORD: "test_oel_pass"
MYSQL_RANDOM_ROOT_PASSWORD: true
# these options are blatantly copied from edx-platform's values
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install Dependencies
run: pip install -r requirements/ci.txt
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox -e ${{ matrix.toxenv }}