@@ -2,15 +2,22 @@ name: Django compat test
22
33on :
44 push :
5+ pull_request :
56
67jobs :
78 build :
9+ name : " Run Django LTS test suite"
810 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"
915 steps :
1016 - name : Start MySQL
1117 run : |
1218 sudo systemctl start mysql.service
1319 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;"
1421 mysql -uroot -proot -e "CREATE USER 'scott'@'%' IDENTIFIED BY 'tiger'; GRANT ALL ON *.* TO scott;"
1522 mysql -uroot -proot -e "CREATE DATABASE django_default; CREATE DATABASE django_other;"
1623
@@ -19,27 +26,28 @@ jobs:
1926 - name : Set up Python
2027 uses : actions/setup-python@v4
2128 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"
2434
2535 - name : Install mysqlclient
26- env :
27- PIP_NO_PYTHON_VERSION_WARNING : 1
28- PIP_DISABLE_PIP_VERSION_CHECK : 1
2936 run : |
30- pip install -r requirements.txt
37+ #pip install -r requirements.txt
38+ #pip install mysqlclient # Use stable version
3139 pip install .
32- # pip install mysqlclient # Use stable version
3340
34- - name : Run Django test
35- env :
36- DJANGO_VERSION : " 3.2.19"
41+ - name : Setup Django
3742 run : |
3843 sudo apt-get install libmemcached-dev
3944 wget https://github.com/django/django/archive/${DJANGO_VERSION}.tar.gz
4045 tar xf ${DJANGO_VERSION}.tar.gz
4146 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 : |
4252 cd django-${DJANGO_VERSION}/tests/
43- pip install ..
44- pip install -r requirements/py3.txt
4553 PYTHONPATH=.. python3 ./runtests.py --settings=test_mysql
0 commit comments