Skip to content

Commit 9028631

Browse files
ducheneansdelcourt
andauthored
Plone 6 compatibility (#60)
--------- Co-authored-by: sdelcourt <simon.delcourt@imio.be>
1 parent d7b3cc1 commit 9028631

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+586
-265
lines changed

.github/workflows/python-package.yml

Lines changed: 47 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: Push tests
5+
# run-name: ${{ github.actor }} push tests
56

67
on:
78
push:
89
pull_request:
910

1011
jobs:
1112
test:
12-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-22.04
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
PLONE_VERSION: [ 4.3, 5.1, 5.2 ]
17+
include:
18+
- python: 2.7.18
19+
plone: 4.3
20+
- python: 3.7.14
21+
plone: 5.2
22+
- python: 3.10.11
23+
plone: "6.0"
1724
services:
1825
libreoffice:
1926
image: imiobe/libreoffice:7.3
@@ -24,51 +31,46 @@ jobs:
2431
- /var/tmp:/var/tmp
2532
steps:
2633
- name: Checkout
27-
uses: actions/checkout@v2
28-
- name: Set up pyenv and Python
29-
uses: "gabrielfalcao/pyenv-action@v14"
30-
with:
31-
default: 2.7.18
32-
versions: 3.8.16
33-
command: pyenv -v
34+
uses: actions/checkout@v3
3435
- name: Setup Env
3536
run: |
3637
mkdir -p -m 777 /tmp/appy/
3738
sudo add-apt-repository ppa:libreoffice/ppa -y
3839
sudo apt update -qq -y
3940
sudo apt-get install -qq -y libreoffice libreoffice-script-provider-python
40-
sudo apt-get autoremove -qq -y
41-
sudo apt-get autoclean -qq -y
4241
mkdir -p buildout-cache/{eggs,downloads}
43-
pip install -r requirements.txt
42+
- name: Set up pyenv and Python
43+
uses: "gabrielfalcao/pyenv-action@v14"
44+
with:
45+
default: "${{ matrix.python }}"
46+
- name: Setup Python env
47+
run: |
48+
pip install --upgrade pip
49+
pip install -r requirements-${{ matrix.plone }}.txt
4450
- name: Cache eggs
4551
uses: actions/cache@v2
4652
env:
4753
cache-name: cache-eggs
4854
with:
4955
path: ~/buildout-cache/eggs
50-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
51-
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
56+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }}
57+
restore-keys: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }}
5258
- name: buildout
5359
run: |
54-
sed -ie "s#plone-5#plone-${{matrix.PLONE_VERSION}}#" test-ci.cfg
55-
pip install -r requirements.txt coverage==5.3.1
56-
buildout -c test-ci.cfg annotate
57-
buildout -c test-ci.cfg
58-
bin/translation-manage -c
59-
- name: code-analysis
60-
run: |
61-
bin/code-analysis
60+
sed -ie "s#test.cfg#test-${{matrix.plone}}.cfg#" gha.cfg
61+
buildout -c gha.cfg annotate
62+
buildout -c gha.cfg
6263
- name: test
6364
run: |
64-
docker ps -a
65-
bin/test --test=\!"robot"
65+
bin/test -t !robot
6666
coverage:
67-
runs-on: ubuntu-20.04
67+
runs-on: ubuntu-22.04
6868
strategy:
6969
fail-fast: false
7070
matrix:
71-
PLONE_VERSION: [5.2]
71+
include:
72+
- python: 3.10.11
73+
plone: "6.0"
7274
services:
7375
libreoffice:
7476
image: imiobe/libreoffice:7.3
@@ -79,49 +81,41 @@ jobs:
7981
- /var/tmp:/var/tmp
8082
steps:
8183
- name: Checkout
82-
uses: actions/checkout@v2
83-
- name: Set up pyenv and Python
84-
uses: "gabrielfalcao/pyenv-action@v14"
85-
with:
86-
default: 2.7.18
87-
versions: 3.8.16
88-
command: pyenv -v
84+
uses: actions/checkout@v3
8985
- name: Setup Env
9086
run: |
9187
mkdir -p -m 777 /tmp/appy/
9288
sudo add-apt-repository ppa:libreoffice/ppa -y
9389
sudo apt update -qq -y
9490
sudo apt-get install -qq -y libreoffice libreoffice-script-provider-python
95-
sudo apt-get autoremove -qq -y
96-
sudo apt-get autoclean -qq -y
9791
mkdir -p buildout-cache/{eggs,downloads}
98-
pip install -r requirements.txt
92+
- name: Set up pyenv and Python
93+
uses: "gabrielfalcao/pyenv-action@v14"
94+
with:
95+
default: "${{ matrix.python }}"
96+
- name: Setup Python env
97+
run: |
98+
pip install --upgrade pip
99+
pip install -r requirements-${{ matrix.plone }}.txt
100+
pip install -U coveralls
99101
- name: Cache eggs
100102
uses: actions/cache@v2
101103
env:
102104
cache-name: cache-eggs
103105
with:
104106
path: ~/buildout-cache/eggs
105-
key: ${{ runner.os }}-coverage-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
106-
restore-keys: ${{ runner.os }}-coverage-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
107+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }}
108+
restore-keys: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }}
107109
- name: buildout
108110
run: |
109-
sed -ie "s#plone-5#plone-${{matrix.PLONE_VERSION}}#" test-ci.cfg
110-
pip install -r requirements.txt coverage==5.3.1
111-
buildout -c test-ci.cfg annotate
112-
buildout -c test-ci.cfg
113-
bin/translation-manage -c
114-
- name: test coverage
111+
sed -ie "s#test.cfg#test-${{matrix.plone}}.cfg#" gha.cfg
112+
buildout -c gha.cfg
113+
- name: code-analysis
115114
run: |
116-
bin/coverage run bin/test --test=\!"robot"
117-
- name: Set up Python 3.8
118-
uses: actions/setup-python@v2
119-
with:
120-
python-version: 3.8
121-
- name: Install Coveralls
115+
bin/code-analysis
116+
- name: test coverage
122117
run: |
123-
pip3 install -U pip setuptools --no-cache-dir
124-
pip3 install -U "coveralls>=3.0.0" coverage==5.3.1 --no-cache-dir
118+
bin/coverage run bin/test -t !robot
125119
- name: Publish to Coveralls
126120
env:
127121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGES.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Changelog
22
=========
33

4-
3.44 (unreleased)
5-
-----------------
4+
4.0 (unreleased)
5+
----------------
66

7-
- Nothing changed yet.
7+
- Python 3, Plone 5.2 and Plone 6.0 compatible.
8+
[aduchene]
89

910

1011
3.43 (2024-04-10)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ lo_version="7.3"
55
args = $(filter-out $@,$(MAKECMDGOALS))
66

77
all: run
8-
py:=2.7
8+
py:=3.9
99

1010
.PHONY: bootstrap buildout run test cleanall startlibreoffice stoplibreoffice
1111
bootstrap:
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ package-extras = [test]
55
show-picked-versions = true
66
allow-picked-versions = true
77

8-
extends =
9-
versions.cfg
10-
118
develop = .
129

1310
eggs +=

buildout.cfg

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
[buildout]
22
extends =
3-
buildout.d/plone-5.2.x.cfg
4-
# buildout.d/plone-5.1.x.cfg
5-
# buildout.d/plone-4.3.x.cfg
3+
https://raw.github.com/collective/buildout.plonetest/master/test-6.0.x.cfg
4+
development.cfg
5+
6+
auto-checkout +=
7+
plone.restapi
8+
9+
[sources]
10+
collective.excelexport = git ${remotes:collective}/collective.excelexport.git pushurl=${remotes:collective_push}/collective.excelexport.git branch=plone6
11+
appy = git ${remotes:imio}/appy.git pushurl=${remotes:imio_push}/appy.git branch=python3
12+
plone.restapi = git ${remotes:plone}/plone.restapi.git pushurl=${remotes:plone_push}/plone.restapi.git branch=main
13+
imio.helpers = git ${remotes:imio}/imio.helpers.git pushurl=${remotes:imio_push}/imio.helpers.git branch=plone6
14+
15+
[versions]
16+
appy =
17+
# to keep prompt-toolkit < 3
18+
ipython = 8.3.0
19+
20+
ipdb = 0.13.9
21+
iw.debug = 0.3
22+
jedi = 0.18.1
23+
parso = 0.8.3
24+
25+
# Required by:
26+
# ipdb
27+
asttokens = 2.0.8
28+
backcall = 0.2.0
29+
executing = 1.1.1
30+
matplotlib-inline = 0.1.6
31+
pexpect = 4.8.0
32+
pickleshare = 0.7.5
33+
ptyprocess = 0.7.0
34+
pure-eval = 0.2.2
35+
stack-data = 0.5.1
36+
traitlets = 5.4.0

buildout.d/plone-4.3.x.cfg

Lines changed: 0 additions & 11 deletions
This file was deleted.

buildout.d/plone-5.1.x.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.

buildout.d/plone-5.2.x.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ imio = https://github.com/imio
4747
imio_push = git@github.com:imio
4848
collective = https://github.com/collective
4949
collective_push = git@github.com:collective
50+
plone = https://github.com/plone
51+
plone_push = git@github.com:plone
5052

5153
[sources]
5254
collective.big.bang = git ${remotes:collective}/collective.big.bang.git pushurl=${remotes:collective_push}/collective.big.bang.git branch=main

gha.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[buildout]
2+
extends =
3+
test.cfg
4+
eggs-directory = ~/buildout-cache/eggs

0 commit comments

Comments
 (0)