-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.29 KB
/
default.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
name: Test
on: [push, pull_request]
jobs:
test:
name: Test Theatricalia
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9]
thing-to-test: [flake8, django-v3, django-v41, django-v42]
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up database
uses: getong/[email protected]
with:
mariadb version: '10.11'
mysql database: 'theatricalia'
mysql root password: 'root'
- name: Install dependencies
run: pip install tox tox-gh-actions codecov
- name: Set up config
run: |
echo "
SECRET_KEY = '123456'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'CONN_MAX_AGE': None,
'NAME': 'theatricalia',
'HOST': '127.0.0.1',
'USER': 'root',
'PASSWORD': 'root'
}
}" > theatricalia/settings/config.py
- name: Run tests
run: tox
env:
THING_TO_TEST: ${{ matrix.thing-to-test }}
- name: Upload code coverage
if: matrix.thing-to-test != 'flake8'
run: codecov