This repository was archived by the owner on Oct 19, 2023. It is now read-only.
forked from PyMySQL/mysqlclient
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.57 KB
/
django.yaml
File metadata and controls
53 lines (46 loc) · 1.57 KB
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
name: Django compat test
on:
push:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Start MySQL
run: |
sudo systemctl start mysql.service
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -proot mysql
mysql -uroot -proot -e "CREATE USER 'scott'@'%' IDENTIFIED BY 'tiger'; GRANT ALL ON *.* TO scott;"
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-django-pip-1
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v2
with:
# https://www.mail-archive.com/django-updates@googlegroups.com/msg209056.html
python-version: "3.8"
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install mysqlclient
env:
PIP_NO_PYTHON_VERSION_WARNING: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
run: |
pip install -U pytest pytest-cov tblib
pip install .
# pip install mysqlclient # Use stable version
- name: Run Django test
env:
DJANGO_VERSION: "2.2.24"
run: |
sudo apt-get install libmemcached-dev
wget https://github.com/django/django/archive/${DJANGO_VERSION}.tar.gz
tar xf ${DJANGO_VERSION}.tar.gz
cp ci/test_mysql.py django-${DJANGO_VERSION}/tests/
cd django-${DJANGO_VERSION}/tests/
pip install ..
pip install -r requirements/py3.txt
PYTHONPATH=.. python3 ./runtests.py --settings=test_mysql