Skip to content

Commit

Permalink
Merge pull request #333 from collective/fix_ghactions
Browse files Browse the repository at this point in the history
Try to fix github actions
  • Loading branch information
pbauer committed Apr 1, 2022
2 parents e7367c1 + d8e1d32 commit e3d9f10
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 69 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,13 @@ jobs:
matrix:
config:
# [Python version, tox env]
- ["2.7", "plone50-py27"]
- ["2.7", "plone51-py27"]
- ["2.7", "plone52-py27"]
- ["3.6", "plone52-py36"]
- ["3.7", "plone52-py37"]
- ["3.8", "plone52-py38"]
- ["3.7", "plone60-py37"]
- ["3.8", "plone60-py38"]
- ["3.9", "plone60-py39"]
runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Install lxml dev libraries
# Needed to avoid error on Plone 5.0.
# Error: Please make sure the libxml2 and libxslt development packages are installed.
run: sudo apt-get install libxml2-dev libxslt1-dev
if: matrix.config[1] == 'plone50-py27'
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand Down
52 changes: 52 additions & 0 deletions base.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
[buildout]
index = https://pypi.org/simple/
extends =
https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg

show-picked-versions = true
extensions =
mr.developer

parts =
instance
omelette
releaser
test

develop = .
package-name = collective.easyform
package-extras = [test]

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
environment-vars =
zope_i18n_compile_mo_files true
eggs =
Plone
Pillow
collective.easyform
Products.PDBDebugMode
pdbpp

[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}

[releaser]
recipe = zc.recipe.egg
eggs = zest.releaser[recommended]

[code-analysis]
pre-commit-hook = False
flake8 = True
flake8-ignore = E501,C901,W503

[versions]
# Don't use a released version of collective.exportimport
collective.easyform =
plone.formwidget.hcaptcha = 1.0.1
plone.formwidget.recaptcha = 2.3.0
# For Buildout related packages, it is easiest to keep them at the same version for all environments.
# Keep these empty will ensure it uses what got installed by requirements.txt
setuptools =
wheel =
zc.buildout =
pip =
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[buildout]
extends = tests-5.2.x.cfg
extends = tests-6.0.x.cfg

parts +=
releaser
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
zc.buildout==3.0.0b3
setuptools==59.8.0
zc.buildout==3.0.0rc2
6 changes: 1 addition & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: Addon",
"Framework :: Plone :: 5.0",
"Framework :: Plone :: 5.1",
"Framework :: Plone :: 5.2",
"Framework :: Plone :: 6.0",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
],
Expand Down
10 changes: 5 additions & 5 deletions src/collective/easyform/tests/testMailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def test_MailerXMLAttachments(self):
topic="test subject",
richtext="Raw",
comments=u"test comments😀",
datetime="2019-04-01T00:00:00",
datetime="2019-04-01 00:00:00",
date="2019-04-02",
delta=datetime.timedelta(1),
bool=True,
Expand All @@ -632,7 +632,7 @@ def test_MailerXMLAttachments(self):
b'<field name="topic">test subject</field>',
b'<field name="richtext">Raw</field>',
b'<field name="comments">test comments\xf0\x9f\x98\x80</field>',
b'<field name="datetime">2019-04-01T00:00:00</field>',
b'<field name="datetime">2019-04-01 00:00:00</field>',
b'<field name="date">2019-04-02</field>',
b'<field name="bool">True</field>',
b'<field name="number">1981</field>',
Expand Down Expand Up @@ -661,7 +661,7 @@ def test_MailerCSVAttachments(self):
topic="test subject",
richtext="Raw",
comments=u"test comments😀",
datetime="2019-04-01T00:00:00",
datetime="2019-04-01 00:00:00",
date="2019-04-02",
delta=datetime.timedelta(1),
bool=True,
Expand All @@ -685,7 +685,7 @@ def test_MailerCSVAttachments(self):
b"test subject",
b"Raw",
b"test comments\xf0\x9f\x98\x80",
b"2019-04-01T00:00:00",
b"2019-04-01 00:00:00",
b"2019-04-02",
b"True",
b"1981",
Expand Down Expand Up @@ -715,7 +715,7 @@ def test_MailerXLSXAttachments(self):
topic="test subject",
richtext="Raw",
comments=u"test comments😀",
datetime="2019-04-01T00:00:00",
datetime="2019-04-01 00:00:00",
date="2019-04-01",
delta=datetime.timedelta(1),
bool=True,
Expand Down
21 changes: 0 additions & 21 deletions src/collective/easyform/tests/testMisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,12 @@
# Integration tests for miscellaneous stuff
#

from AccessControl import Unauthorized
from collective.easyform.actions import OrderedDict
from collective.easyform.browser.fields import ModelEditorView
from collective.easyform.tests import base
from plone import api
from plone.namedfile.file import NamedFile
from zope.component import getMultiAdapter


class TestMisc(base.EasyFormTestCase):
"""test miscellaneous stuff"""

def test_ordereddict_reverse(self):
d = OrderedDict()
d["a"] = 1
d["b"] = 2
d["c"] = 3
self.assertEqual(d.reverse(), [("c", 3), ("b", 2), ("a", 1)])

def test_default_values_translated(self):
self.layer["request"]["LANGUAGE"] = "de"
self.folder.invokeFactory("EasyForm", "ff1")
# Check if the submitLabel is translated at all.
# If you ever change the german translation of the submit label, change it here also
self.assertEqual(self.folder.ff1.submitLabel, "Absenden")


class TestGetEasyFormURL(base.EasyFormTestCase):
"""test GetEasyFormURL stuff"""

Expand Down
10 changes: 0 additions & 10 deletions tests-5.0.x.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions tests-5.1.x.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions tests-5.2.x.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[tox]
minversion = 3.18
envlist =
plone50-py27
plone51-py27
plone52-py{27,36,37,38}
plone60-py{37,38,39}

[testenv]
Expand All @@ -13,9 +10,6 @@ skip_install = true
deps =
-r requirements.txt
commands_pre =
plone50: {envbindir}/buildout -Nc {toxinidir}/tests-5.0.x.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
plone51: {envbindir}/buildout -Nc {toxinidir}/tests-5.1.x.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
plone52: {envbindir}/buildout -Nc {toxinidir}/tests-5.2.x.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
plone60: {envbindir}/buildout -Nc {toxinidir}/tests-6.0.x.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
commands =
{envbindir}/test

0 comments on commit e3d9f10

Please sign in to comment.