Add CI tests for Django 2.2, 3.0, 3.1

This commit is contained in:
Claude Paroz 2021-08-09 20:02:51 +02:00
parent 0d8895b8cc
commit 97f54ed37c
4 changed files with 61 additions and 10 deletions

View File

@ -3,18 +3,18 @@ language: python
matrix:
include:
- python: 3.8
env: DJANGO_VERSION=">=3.1,<3.2" XAPIAN_VERSION=1.4.9
- python: 3.8
env: DJANGO_VERSION=">=3.0,<3.1" XAPIAN_VERSION=1.4.9
- python: 3.7
env: DJANGO_VERSION=">=2.2,<3.0" XAPIAN_VERSION=1.4.9
- python: 3.7
env: DJANGO_VERSION=">=2.1,<2.2" XAPIAN_VERSION=1.4.9
dist: xenial
sudo: true
- python: 3.7
env: DJANGO_VERSION=">=2.0,<2.1" XAPIAN_VERSION=1.4.9
dist: xenial
sudo: true
- python: 3.7
env: DJANGO_VERSION=">=1.11,<2.0" XAPIAN_VERSION=1.4.9
dist: xenial
sudo: true
- python: 3.6
env: DJANGO_VERSION=">=2.1,<2.2" XAPIAN_VERSION=1.4.9
- python: 3.6
@ -27,10 +27,6 @@ matrix:
env: DJANGO_VERSION=">=2.0,<2.1" XAPIAN_VERSION=1.4.9
- python: 3.5
env: DJANGO_VERSION=">=1.11,<2.0" XAPIAN_VERSION=1.4.9
- python: 3.4
env: DJANGO_VERSION=">=2.0,<2.1" XAPIAN_VERSION=1.4.9
- python: 3.4
env: DJANGO_VERSION=">=1.11,<2.0" XAPIAN_VERSION=1.4.9
- python: 3.4
env: DJANGO_VERSION=">=2.0,<2.1" XAPIAN_VERSION=1.3.6
- python: 3.4
@ -65,6 +61,7 @@ install:
script:
- cd django-haystack/
- PYTHONPATH=`pwd` `which django-admin.py` makemigrations --settings=test_haystack.xapian_settings
- PYTHONPATH=`pwd` coverage run `which django-admin.py` test test_haystack.xapian_tests --settings=test_haystack.xapian_settings
after_success: coveralls

View File

@ -5,6 +5,8 @@ INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.messages',
'haystack',
'test_haystack.core',
'test_haystack.xapian_tests',
]

View File

@ -0,0 +1,52 @@
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('core', '__first__'),
('contenttypes', '__first__'),
]
operations = [
migrations.CreateModel(
name='Document',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('type_name', models.CharField(max_length=50)),
('number', models.IntegerField()),
('name', models.CharField(max_length=200)),
('date', models.DateField()),
('summary', models.TextField()),
('text', models.TextField()),
],
),
migrations.CreateModel(
name='DjangoContentType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
],
),
migrations.CreateModel(
name='BlogEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('datetime', models.DateTimeField()),
('date', models.DateField()),
('author', models.CharField(max_length=255)),
('text', models.TextField()),
('funny_text', models.TextField()),
('non_ascii', models.TextField()),
('url', models.URLField()),
('boolean', models.BooleanField()),
('number', models.IntegerField()),
('float_number', models.FloatField()),
('decimal_number', models.DecimalField(decimal_places=2, max_digits=4)),
('tags', models.ManyToManyField(to='core.MockTag')),
],
),
]