-
Notifications
You must be signed in to change notification settings - Fork 9
102 lines (85 loc) · 2.36 KB
/
testing-32.yaml
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
99
100
101
102
name: Testing Django 3.2
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Django32:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.10.1'
- '3.9.9'
- '3.8.12'
- '3.7.12'
django-version:
- '3.2.10'
database-taget:
- 'mysql'
- 'postgres'
- 'sqlite'
env:
DATABASE_ENGINE: ${{ matrix.database-taget }}
DJANGO_VERSION: ${{ matrix.django-version }}
services:
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: gh_actions_test
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: gh_actions_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Environment Report
run: |
echo Python Version ... $(python --version)
echo Django Version ... ${DJANGO_VERSION}
echo Database Used .... ${DATABASE_ENGINE}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install Django==${{ matrix.django-version }}
pip install -r requirements.txt
- name: Install dependencies (if mysql)
if: ${{ matrix.database-taget == 'mysql' }}
run: |
pip install mysqlclient
- name: Install dependencies (if postgres)
if: ${{ matrix.database-taget == 'postgres' }}
run: |
pip install psycopg2
- name: Unit Testing
run: make test-unit
- name: Coverage Report
run: make test-coverage-report
- name: Local Integration Testing
run: make test-integration
- name: Upload Coverage Report
uses: codecov/codecov-action@v1