Skip to content

Commit

Permalink
Add CI tests for Django 2.2, 3.0, 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Aug 17, 2021
1 parent 0d8895b commit 27d6351
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions tests/xapian_settings.py
Expand Up @@ -5,6 +5,8 @@
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.messages',
'haystack',
'test_haystack.core',
'test_haystack.xapian_tests',
]
Expand Down
52 changes: 52 additions & 0 deletions tests/xapian_tests/migrations/0001_initial.py
@@ -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')),
],
),
]
Empty file.

0 comments on commit 27d6351

Please sign in to comment.