Skip to content

Commit

Permalink
test plone 6, take last black with Python 2 support,
Browse files Browse the repository at this point in the history
other test setup related updates
  • Loading branch information
jensens committed Feb 8, 2022
1 parent 8817102 commit c7e5d09
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 12 deletions.
42 changes: 32 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
- '5.0'
- '5.1'
- '5.2'
python-version: ['2.7', '3.6', '3.7', '3.8']
- '6.0'
python-version: ['2.7', '3.6', '3.7', '3.8', '3.9']
layer:
- Portlet_AjaxDisabled
- Portlet_AjaxEnabled
Expand All @@ -34,12 +35,24 @@ jobs:
python-version: 3.7
- plone-version: 5.0
python-version: 3.8
- plone-version: 5.0
python-version: 3.9
- plone-version: 5.1
python-version: 3.6
- plone-version: 5.1
python-version: 3.7
- plone-version: 5.1
python-version: 3.8
- plone-version: 5.1
python-version: 3.9
# 5.2 does not run on 3.9
- plone-version: 5.2
python-version: 3.9
# 6.0 does not run on 2.7/3.6
- plone-version: 6.0
python-version: 2.7
- plone-version: 6.0
python-version: 3.6
# Save some time by not running all the robot tests
- python-version: 3.6
layer: Portlet_AjaxDisabled
Expand All @@ -56,7 +69,9 @@ jobs:
coverage: coverage
- plone-version: 5.2
coverage: no_coverage

- plone-version: 6.0
coverage: coverage

steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down Expand Up @@ -94,10 +109,17 @@ jobs:
echo "[buildout]" > $HOME/.buildout/default.cfg
echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
- name: bootstrap buildout
- name: bootstrap buildout (old-school)
if: ${{ matrix.python-version == '2.7' }}
run: |
./bootstrap.sh test-${{ matrix.plone-version }}.x.cfg
ls -al
- name: bootstrap buildout (new-way)
if: ${{ matrix.python-version != '2.7' }}
run: |
python -m venv .
bin/pip install -r requirements-${{ matrix.plone-version }}.x.txt
ls -al
- name: buildout
run: |
bin/buildout -t 10 -Nc test-${{ matrix.plone-version }}.x.cfg
Expand All @@ -110,12 +132,12 @@ jobs:
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
sleep 3
bin/test --all --layer ${{ matrix.layer }} --list-tests
bin/test --all --layer ${{ matrix.layer }} --list-tests
bin/test --all --layer ${{ matrix.layer }}
- name: test unit
if: ${{ matrix.coverage != 'coverage' && matrix.layer == 'unit' }}
run: |
bin/test --unit --list-tests
bin/test --unit --list-tests
bin/test --unit
- name: createcoverage
if: ${{ matrix.coverage == 'coverage' && matrix.layer != 'unit' }}
Expand All @@ -124,13 +146,13 @@ jobs:
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
sleep 3
bin/test --all --layer ${{ matrix.layer }} --list-tests
bin/test --all --layer ${{ matrix.layer }} --list-tests
bin/createcoverage -t '--all --layer ${{ matrix.layer }}'
bin/coverage json -i
- name: createcoverage
if: ${{ matrix.coverage == 'coverage' && matrix.layer == 'unit' }}
run: |
bin/test --unit --list-tests
bin/test --unit --list-tests
bin/createcoverage -t '--unit'
bin/coverage json -i
- name: Coveralls
Expand All @@ -141,11 +163,11 @@ jobs:
flag-name: ${{ matrix.plone-version }}-${{ matrix.python-version }}-${{ matrix.layer }}
- name: code-analysis
if: always()
run: echo "${{ matrix.plone-version }}" | grep 5.1 || bin/code-analysis
run: echo "${{ matrix.plone-version }}" | grep 5.2 || bin/code-analysis
- name: black
if: ${{ matrix.python-version == '3.8' }}
if: ${{ matrix.python-version == '3.9' }}
run: |
pip install black
pip install "black==21.12b0"
black --check src
- name: Artifact Robot Test Report
if: failure()
Expand Down
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ Changelog

Breaking Change:

- Add idx parameter to display_modifier call, so that we can use the index name to resolve the correct translated taxonomy titles in collective.taxonomy.
- Add idx parameter to display_modifier call, so that we can use the index name to resolve the correct translated taxonomy titles in collective.taxonomy.
This means that the display_modifier method in the groupby_modifier adapters needs to expect this parameter too!
[MrTango]

Features:

- Support and Test Plone 6.
[jensens]

- Add a module global COLLECTIONISH_TARGETS to c.c.tiles to register other tiles with collections than plone.app.standardtiles.contentlisting.
[jensens]

Expand Down
1 change: 1 addition & 0 deletions requirements-5.2.x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r https://dist.plone.org/release/5.2-latest/requirements.txt
1 change: 1 addition & 0 deletions requirements-6.0.x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r https://dist.plone.org/release/6.0-latest/requirements.txt
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os


version = "3.6.dev0"
version = "4.0.dev0"


def read(*rnames):
Expand All @@ -26,11 +26,14 @@ def read(*rnames):
"Framework :: Plone :: 5.0",
"Framework :: Plone :: 5.1",
"Framework :: Plone :: 5.2",
"Framework :: Plone :: 6.0",
"Framework :: Plone :: Addon",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="plone collection filter faceted tagcloud tags",
Expand Down
2 changes: 2 additions & 0 deletions test-5.0.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ plone.tiles = 2.0.0
plone.jsonserializer = 0.9.6

plone.formwidget.geolocation = < 2.2.2 # Introduced a dep on CMFPlone 5.2

six = 1.16.0
1 change: 1 addition & 0 deletions test-5.1.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ configparser = 3.8.1

plone.formwidget.geolocation = < 2.2.2 # Introduced a dep on CMFPlone 5.2

six = 1.16.0
19 changes: 19 additions & 0 deletions test-6.0.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[buildout]
extends =
https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg
https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg
base.cfg

parts +=
test
createcoverage

parts -=
code-analysis

package-name = collective.collectionfilter
package-extras = [test]
test-eggs =

[versions:python3]
coverage = >=3.7

0 comments on commit c7e5d09

Please sign in to comment.