Skip to content

Commit

Permalink
Merge b2d1611 into 878ff92
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto committed Dec 20, 2020
2 parents 878ff92 + b2d1611 commit 4b52e74
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 38 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,60 @@
name: plone.rest CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 2.7]
plone-version: [5.2, 5.1, 4.3]
exclude:
- python-version: 3.7
plone-version: 4.3
- python-version: 3.7
plone-version: 4.3

steps:

# git checkout
- uses: actions/checkout@v2

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

# python cache
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# python install
- run: pip install virtualenv
- run: pip install wheel
- name: pip install
run: pip install -r requirements.txt
- name: choose Plone version
run: sed -ie "s#plone-x.x.x.cfg#plone-${{ matrix.plone-version }}.x.cfg#" ci.cfg

# buildout
- name: buildout
run: buildout -t 10 -c ci.cfg
env:
CI: true

# black
- name: black
run: if [ "${{ matrix.plone-version }}" == "5.2" ] && [ ${{ matrix.python-version }} == '3.7' ]; then pip install black && black src/ --check; fi

# code analysis
- name: black
run: bin/code-analysis

# test
- name: test
run: bin/test
10 changes: 8 additions & 2 deletions Makefile
Expand Up @@ -3,7 +3,7 @@
SHELL := /bin/bash
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

version = 3.7
version = 3

# We like colors
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
Expand All @@ -27,7 +27,7 @@ update: ## Update Make and Buildout
wget -O plone-4.3.x.cfg https://raw.githubusercontent.com/kitconcept/buildout/master/plone-4.3.x.cfg
wget -O plone-5.1.x.cfg https://raw.githubusercontent.com/kitconcept/buildout/master/plone-5.1.x.cfg
wget -O plone-5.2.x.cfg https://raw.githubusercontent.com/kitconcept/buildout/master/plone-5.2.x.cfg
wget -O travis.cfg https://raw.githubusercontent.com/kitconcept/buildout/master/travis.cfg
wget -O ci.cfg https://raw.githubusercontent.com/kitconcept/buildout/master/travis.cfg
wget -O versions.cfg https://raw.githubusercontent.com/kitconcept/buildout/master/versions.cfg

.installed.cfg: bin/buildout *.cfg
Expand Down Expand Up @@ -71,6 +71,12 @@ build-plone-5.2: .installed.cfg ## Build Plone 5.2
bin/pip install -r requirements.txt
bin/buildout -c plone-5.2.x.cfg

.PHONY: Build Plone 5.2 Performance
build-plone-5.2-performance: .installed.cfg ## Build Plone 5.2
bin/pip install --upgrade pip
bin/pip install -r requirements.txt
bin/buildout -c plone-5.2.x-performance.cfg

.PHONY: Test
test: ## Test
bin/test
Expand Down
1 change: 0 additions & 1 deletion base.cfg
Expand Up @@ -58,7 +58,6 @@ eggs =
towncrier
readme
docutils
httpie

[sources]
plone.dexterity = git git://github.com/plone/plone.dexterity.git pushurl=git@github.com:plone/plone.dexterity.git branch=plip-680
Expand Down
7 changes: 7 additions & 0 deletions ci.cfg
@@ -0,0 +1,7 @@
[buildout]
extends = plone-x.x.x.cfg

[code-analysis]
recipe = plone.recipe.codeanalysis
pre-commit-hook = False
return-status-codes = True
38 changes: 15 additions & 23 deletions plone-4.3.x.cfg
@@ -1,38 +1,30 @@
[buildout]
extends =
base.cfg
http://dist.plone.org/release/4.3.19/versions.cfg
https://dist.plone.org/release/4.3.20/versions.cfg
versions.cfg

[versions]
plone.testing = 5.0.0
pytz = 2017.3
zope.interface = 4.1.0

# fixes zlib failure: https://stackoverflow.com/questions/34631806/fail-during-installation-of-pillow-python-module-in-linux
# Pillow = 5.4.1
future = 0.17.1
six = 1.11.0

# Required for Python 2.7 compatibility
more-itertools = <6.0.0
zipp = >=0.5, <2a

# plone.restapi specific
plone.schema = 1.2.0
# fixes: SyntaxError: invalid syntax (more.py, line 340)
zipp = 0.5.2

# zest.releaser
zest.releaser = 6.20.1
twine = 1.11.0
requests = 2.22.0
towncrier = 19.2.0
zestreleaser.towncrier = 1.1.0
# docutils = 0.13.1
# more-itertools >= 6.0.0 dropped python2.7 support
more-itertools = 5.0.0

# Sphinx
Sphinx = 1.6.5
docutils = 0.14
# Error: The requirement ('Pygments>=2.5.1') is not allowed by your [versions] constraint (2.2.0)
Pygments = 2.5.2
sphinxcontrib-httpexample = 0.7.0
sphinxcontrib-httpdomain = 1.5.0
sphinx-rtd-theme = 0.2.4
Jinja2 = 2.10
Babel = 2.5.1
astunparse = 1.6.2

# Last pyrsistent version that is python 2 compatible:
pyrsistent = 0.15.7

# Error: The requirement ('distlib<1,>=0.3.1') is not allowed by your [versions] constraint (0.3.0)
distlib = 0.3.1
19 changes: 12 additions & 7 deletions plone-5.1.x.cfg
@@ -1,30 +1,35 @@
[buildout]
extends =
base.cfg
http://dist.plone.org/release/5.1.6/versions.cfg
https://dist.plone.org/release/5.1.7/versions.cfg
versions.cfg

[versions]
plone.testing = 5.0.0

# Error: The requirement ('virtualenv>=20.0.35') is not allowed by your [versions] constraint (20.0.26)
virtualenv = 20.0.35

# Error: The requirement ('distlib<1,>=0.3.1') is not allowed by your [versions] constraint (0.3.0)
distlib = 0.3.1

# fixes: SyntaxError: invalid syntax (more.py, line 340)
zipp = 0.5.2

# plone.restapi specific
plone.schema = 1.2.0

# zest.releaser
zest.releaser = 6.20.1
twine = 1.11.0
requests = 2.22.0
towncrier = 19.2.0
zestreleaser.towncrier = 1.1.0
# docutils = 0.13.1

# Sphinx
Sphinx = 1.6.5
docutils = 0.14
Pygments = 2.5.2
Pygments = 2.5.1
sphinxcontrib-httpexample = 0.7.0
sphinxcontrib-httpdomain = 1.5.0
sphinx-rtd-theme = 0.2.4
Jinja2 = 2.10
Babel = 2.5.1
astunparse = 1.6.2
astunparse = 1.6.2
16 changes: 12 additions & 4 deletions plone-5.2.x.cfg
@@ -1,10 +1,18 @@
[buildout]
extends =
base.cfg
http://dist.plone.org/release/5.2.1/versions.cfg
find-links += http://dist.plone.org/thirdparty/
https://dist.plone.org/release/5.2.3/versions.cfg
find-links += https://dist.plone.org/thirdparty/
versions=versions

[versions]
# httpie depdendency, Pygments conflicts with
Pygments = 2.5.2
black = 20.8b1

# Error: The requirement ('virtualenv>=20.0.35') is not allowed by your [versions] constraint (20.0.26)
virtualenv = 20.0.35

# Error: The requirement ('pep517>=0.9') is not allowed by your [versions] constraint (0.8.2)
pep517 = 0.9.1

# Error: The requirement ('importlib-metadata>=1') is not allowed by your [versions] constraint (0.23)
importlib-metadata = 2.0.0
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,3 +1,3 @@
# Keep this file in sync with: https://github.com/kitconcept/buildout/edit/master/requirements.txt
setuptools==42.0.2
zc.buildout==2.13.2
zc.buildout==2.13.3
41 changes: 41 additions & 0 deletions versions.cfg
Expand Up @@ -2,3 +2,44 @@
# Buildout
setuptools =
zc.buildout =
zc.recipe.egg = 2.0.3

# fixes Getting distribution for 'configparser'. assert newdist is not None # newloc above is missing our dist?!
configparser = 3.5.3

# fixes Error: The requirement ('Pygments>=2.5.1') is not allowed by your [versions] constraint (2.2.0)
Pygments = 2.5.1

# plone.recipe.varnish
plone.recipe.varnish = 1.3

# Code-analysis
plone.recipe.codeanalysis = 3.0.1
coverage = 3.7.1
pep8 = 1.7.1
flake8 = 3.5.0
flake8-coding = 1.3.2
pycodestyle = 2.3.1

# Release
zest.releaser = 6.17.0
twine = 1.11.0
requests = 2.18.4
towncrier = 19.2.0
zestreleaser.towncrier = 1.1.0
docutils = 0.13.1

# Sphinx
Sphinx = 1.6.5
docutils = 0.14
Pygments = 2.2.0
sphinxcontrib-httpexample = 0.7.0
sphinxcontrib-httpdomain = 1.5.0
sphinx-rtd-theme = 0.2.4
Jinja2 = 2.10
Babel = 2.5.1

# plone.rest(api) specific pins

# last py2 compatible version
httpie = 1.0.3

0 comments on commit 4b52e74

Please sign in to comment.