@@ -2,15 +2,22 @@ name: Django compat test
2
2
3
3
on :
4
4
push :
5
+ pull_request :
5
6
6
7
jobs :
7
8
build :
9
+ name : " Run Django LTS test suite"
8
10
runs-on : ubuntu-latest
11
+ env :
12
+ PIP_NO_PYTHON_VERSION_WARNING : 1
13
+ PIP_DISABLE_PIP_VERSION_CHECK : 1
14
+ DJANGO_VERSION : " 3.2.19"
9
15
steps :
10
16
- name : Start MySQL
11
17
run : |
12
18
sudo systemctl start mysql.service
13
19
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -proot mysql
20
+ mysql -uroot -proot -e "set global innodb_flush_log_at_trx_commit=0;"
14
21
mysql -uroot -proot -e "CREATE USER 'scott'@'%' IDENTIFIED BY 'tiger'; GRANT ALL ON *.* TO scott;"
15
22
mysql -uroot -proot -e "CREATE DATABASE django_default; CREATE DATABASE django_other;"
16
23
@@ -19,27 +26,28 @@ jobs:
19
26
- name : Set up Python
20
27
uses : actions/setup-python@v4
21
28
with :
22
- # https://www.mail-archive.com/django-updates@googlegroups.com/msg209056.html
23
- python-version : " 3.11"
29
+ # Django 3.2.9+ supports Python 3.10
30
+ # https://docs.djangoproject.com/ja/3.2/releases/3.2/
31
+ python-version : " 3.10"
32
+ cache : " pip"
33
+ cache-dependency-path : " ci/django-requirements.txt"
24
34
25
35
- name : Install mysqlclient
26
- env :
27
- PIP_NO_PYTHON_VERSION_WARNING : 1
28
- PIP_DISABLE_PIP_VERSION_CHECK : 1
29
36
run : |
30
- pip install -r requirements.txt
37
+ #pip install -r requirements.txt
38
+ #pip install mysqlclient # Use stable version
31
39
pip install .
32
- # pip install mysqlclient # Use stable version
33
40
34
- - name : Run Django test
35
- env :
36
- DJANGO_VERSION : " 3.2.19"
41
+ - name : Setup Django
37
42
run : |
38
43
sudo apt-get install libmemcached-dev
39
44
wget https://github.com/django/django/archive/${DJANGO_VERSION}.tar.gz
40
45
tar xf ${DJANGO_VERSION}.tar.gz
41
46
cp ci/test_mysql.py django-${DJANGO_VERSION}/tests/
47
+ cd django-${DJANGO_VERSION}
48
+ pip install . -r tests/requirements/py3.txt
49
+
50
+ - name : Run Django test
51
+ run : |
42
52
cd django-${DJANGO_VERSION}/tests/
43
- pip install ..
44
- pip install -r requirements/py3.txt
45
53
PYTHONPATH=.. python3 ./runtests.py --settings=test_mysql
0 commit comments