-
Notifications
You must be signed in to change notification settings - Fork 49
83 lines (71 loc) · 2.43 KB
/
tests.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
name: Test
on:
push:
branches:
- master
- develop
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Lint with flake8
run: |
tox -e lint
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12"]
django-version: [ "4.2", "5.1"]
db-engine: ["pg", "mysql"]
env:
PY_VER: ${{ matrix.python-version}}
DJ_VER: ${{ matrix.django-version}}
DBENGINE: ${{ matrix.db-engine}}
MYSQL_USER: 'root'
MYSQL_PASSWORD: 'root'
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: concurrency
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
# mysql:
# image: mysql:5.7
# env:
# MYSQL_DATABASE: test_db
# MYSQL_USER: user
# MYSQL_PASSWORD: password
# MYSQL_ROOT_PASSWORD: rootpassword
# ports:
# - 33306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v2
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE concurrency;' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
- 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 tox
- name: Test with
run: tox -e d${DJ_VER//.}-py${PY_VER//.}-${DBENGINE}
- uses: codecov/codecov-action@v1
with:
verbose: true