Skip to content

Commit

Permalink
Add CI build for integration with plone.app.contenttypes
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Aug 14, 2015
1 parent becf540 commit 6170b8b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -14,6 +14,7 @@ env:
matrix:
- PLONE_VERSION=4.2
- PLONE_VERSION=4.3
- PLONE_VERSION=4.3 DEXTERITY_ONLY=true
- PLONE_VERSION=4.3 JQUERY=1.8.3
- PLONE_VERSION=5.0
matrix:
Expand All @@ -23,6 +24,7 @@ matrix:
install:
- sed -ie "s#test-4.3#test-$PLONE_VERSION#" buildout.cfg
- sed -ie "s#versions-4.3#versions-$PLONE_VERSION#" buildout.cfg
- test $DEXTERITY_ONLY && sed -ie "s#test-eggs =#test-eggs = plone.app.contenttypes#" buildout.cfg || true
- test $JQUERY && sed -ie "s#plone.app.jquery = 1.7.2#plone.app.jquery = $JQUERY#" versions-4.3.x.cfg || true
- python bootstrap.py
- bin/buildout annotate
Expand Down
14 changes: 14 additions & 0 deletions src/collective/cover/testing.py
Expand Up @@ -17,6 +17,13 @@
import random


try:
import plone.app.contenttypes
except ImportError:
DEXTERITY_ONLY = False
else:
DEXTERITY_ONLY = True

try:
pkg_resources.get_distribution('Products.PloneFormGen')
except pkg_resources.DistributionNotFound:
Expand Down Expand Up @@ -91,6 +98,10 @@ class Fixture(PloneSandboxLayer):
defaultBases = (PLONE_FIXTURE,)

def setUpZope(self, app, configurationContext):
if DEXTERITY_ONLY:
self.loadZCML(package=plone.app.contenttypes)
z2.installProduct(app, 'Products.DateRecurringIndex')

# XXX: do not install (yet) PFG in Plone 5
if HAS_PFG and PLONE_VERSION < '5.0':
import Products.PloneFormGen
Expand All @@ -109,6 +120,9 @@ def setUpZope(self, app, configurationContext):
manage_addVirtualHostMonster(app, 'virtual_hosting')

def setUpPloneSite(self, portal):
if DEXTERITY_ONLY and PLONE_VERSION < '5.0':
self.applyProfile(portal, 'plone.app.contenttypes:default')

# XXX: do not install (yet) PFG in Plone 5
if HAS_PFG and PLONE_VERSION < '5.0':
self.applyProfile(portal, 'Products.PloneFormGen:default')
Expand Down
4 changes: 4 additions & 0 deletions versions-4.3.x.cfg
Expand Up @@ -8,5 +8,9 @@ plone.tiles = 1.2
# for testing compatibility with newer versions of jQuery
plone.app.jquery = 1.7.2

# for testing compatibility with Dexterity content types only
plone.app.contenttypes = 1.1b3
plone.app.event = 1.1.4

# remove unassociated template warnings
grokcore.view = 2.9

0 comments on commit 6170b8b

Please sign in to comment.