-
Notifications
You must be signed in to change notification settings - Fork 13
78 lines (69 loc) · 1.88 KB
/
django.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
name: Django CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
include:
- python-version: 3.7
django-version: Django==3.1
- python-version: 3.8
django-version: Django==3.1
- python-version: 3.7
django-version: Django==3.2
- python-version: 3.8
django-version: Django==3.2
services:
elasticsearch:
image: elasticsearch:7.6.2
env:
discovery.type: single-node
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 9200:9200
dynamodb:
image: amazon/dynamodb-local
ports:
- 8000:8000
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
cd example
pip install ${{ matrix.django-version }}
pip install -r requirements.txt
- name: Flake
run: |
flake8 --config .config/flake8 pyston
- name: Run Tests
run: |
cd example
coverage run --omit */site-packages/*,*/migrations/*,*/lib/* manage.py test app.tests --settings=dj.settings.settings -v 2
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true