Skip to content

Commit e3a76b7

Browse files
committed
Added github action
1 parent 4306e9b commit e3a76b7

File tree

6 files changed

+122
-55
lines changed

6 files changed

+122
-55
lines changed

.github/workflows/main.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-18.04
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- python: 2.7
18+
PLONE_VERSION: 4
19+
- python: 2.7
20+
PLONE_VERSION: 51
21+
- python: 3.7
22+
PLONE_VERSION: 52
23+
- python: 3.8
24+
PLONE_VERSION: 52
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
- name: Set up Python ${{matrix.python}}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{matrix.python}}
32+
- name: Setup Env
33+
run: |
34+
sudo apt-get update -qqy
35+
sudo apt-get install -qqy g++ libpng-dev cmake libqt4-dev libqt5widgets5 qttools5-dev
36+
wget -t 3 -T 60 --waitretry 5 -O zint-2.8.0.tar.gz https://sourceforge.net/projects/zint/files/zint/2.8.0/zint-2.8.0.tar.gz/download
37+
tar -xf zint-2.8.0.tar.gz
38+
cd zint-2.8.0
39+
sudo cmake .
40+
sudo make
41+
sudo make install
42+
cd ..
43+
mkdir -p buildout-cache/{eggs,downloads}
44+
pip install -r requirements.txt coverage==5.3.1 wheel
45+
- name: Cache eggs
46+
uses: actions/cache@v2
47+
env:
48+
cache-name: cache-eggs
49+
with:
50+
path: ./buildout-cache/eggs ./eggs
51+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
52+
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
53+
- name: buildout
54+
run: |
55+
cp test_plone${{matrix.PLONE_VERSION}}.cfg buildout.cfg
56+
buildout annotate
57+
buildout
58+
- name: test
59+
run: |
60+
bin/test
61+
coverage:
62+
runs-on: ubuntu-18.04
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
PLONE_VERSION: [52]
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v2
70+
- name: Set up Python 3.8
71+
uses: actions/setup-python@v2
72+
with:
73+
python-version: 3.8
74+
- name: Setup Env
75+
run: |
76+
sudo apt-get update -qqy
77+
sudo apt-get install -qqy g++ libpng-dev cmake libqt4-dev libqt5widgets5 qttools5-dev
78+
wget -t 3 -T 60 --waitretry 5 -O zint-2.8.0.tar.gz https://sourceforge.net/projects/zint/files/zint/2.8.0/zint-2.8.0.tar.gz/download
79+
tar -xf zint-2.8.0.tar.gz
80+
cd zint-2.8.0
81+
sudo cmake .
82+
sudo make
83+
sudo make install
84+
cd ..
85+
mkdir -p buildout-cache/{eggs,downloads}
86+
pip install -r requirements.txt coverage==5.3.1
87+
pip install -U "coveralls>=3.0.0" coverage==5.3.1 --no-cache-dir
88+
- name: Cache eggs
89+
uses: actions/cache@v2
90+
env:
91+
cache-name: cache-eggs
92+
with:
93+
path: ./buildout-cache/eggs ./eggs
94+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
95+
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }}
96+
- name: buildout
97+
run: |
98+
cp test_plone${{matrix.PLONE_VERSION}}.cfg buildout.cfg
99+
buildout annotate
100+
buildout
101+
- name: test coverage
102+
run: |
103+
bin/coverage run bin/test
104+
- name: Publish to Coveralls
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
run: |
108+
coveralls --service=github

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plone:=4
66

77
.PHONY: bootstrap buildout run test cleanall
88
bootstrap:
9-
if command -v virtualenv-2.7 >/dev/null 2>&1 ; then virtualenv-2.7 .;else virtualenv -p python$(py) .;fi
9+
virtualenv -p python$(py) .
1010
bin/pip install -r requirements.txt
1111
./bin/python bootstrap.py --version=2.13.2
1212

base.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ defaults = ['-s', '${buildout:package-name}', '--auto-color', '--auto-progress']
3434

3535
[code-analysis]
3636
flake8-max-complexity = 50
37-
flake8-ignore = E501, W503, W504, E203, Q000, C812
37+
flake8-ignore = E501, W503, W504, E203, Q000, C812
38+
directory = src/imio/helpers

buildout.cfg

+7-51
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
[buildout]
22

33
extends =
4-
https://raw.github.com/collective/buildout.plonetest/master/test-4.x.cfg
4+
https://raw.github.com/collective/buildout.plonetest/master/test-5.1.x.cfg
55
https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg
66
base.cfg
77

88
show-picked-versions = true
99
allow-picked-versions = true
1010

11-
# update-versions-file = test_plone4.cfg
11+
# update-versions-file = test_plone51.cfg
1212

1313
[versions]
1414
setuptools = 42.0.2
1515
zc.buildout = 2.13.2
16-
configparser = 4.0.2
17-
Pillow = 4.0.0
18-
19-
# Added by buildout at 2020-06-22 13:45:36.514713
16+
;prompt-toolkit = 3.0.19
17+
toml = 0.10.2
18+
traitlets = 4.3.2
19+
# Added by buildout at 2020-06-22 13:24:06.304460
2020
PyPDF2 = 1.26.0
2121
collective.behavior.talcondition = 0.11
22+
configparser = 4.0.2
2223
createcoverage = 1.5
2324
flake8 = 3.8.3
24-
ipdb = 0.12.2
2525
mccabe = 0.6.1
2626
plone.recipe.codeanalysis = 3.0.1
2727
pycodestyle = 2.6.0
2828
pyflakes = 2.2.0
2929
reportlab = 3.5.42
3030
zipp = 1.2.0
31-
natsort = 6.2.1
3231

3332
# Required by:
3433
# plone.recipe.codeanalysis==3.0.1
@@ -39,22 +38,10 @@ check-manifest = 0.42
3938
# zipp==1.2.0
4039
contextlib2 = 0.6.0.post1
4140

42-
# Required by:
43-
# flake8==3.8.3
44-
enum34 = 1.1.10
45-
46-
# Required by:
47-
# flake8==3.8.3
48-
functools32 = 3.2.3.post2
49-
5041
# Required by:
5142
# flake8==3.8.3
5243
importlib-metadata = 1.6.1
5344

54-
# Required by:
55-
# Pillow==4.0.0
56-
olefile = 0.46
57-
5845
# Required by:
5946
# importlib-metadata==1.6.1
6047
pathlib2 = 2.3.5
@@ -66,34 +53,3 @@ pep517 = 0.8.2
6653
# Required by:
6754
# pathlib2==2.3.5
6855
scandir = 1.10.0
69-
70-
# Required by:
71-
# check-manifest==0.42
72-
toml = 0.10.1
73-
74-
# Required by:
75-
# flake8==3.8.3
76-
typing = 3.7.4.1
77-
78-
plone.app.relationfield = 1.3.0
79-
80-
# Required by:
81-
# ipdb
82-
backports.shutil-get-terminal-size = 1.0.0
83-
enum34 = 1.1.6
84-
ipython = 5.7.0
85-
ipython-genutils = 0.2.0
86-
iw.debug = 0.3
87-
pathlib2 = 2.3.2
88-
pexpect = 4.6.0
89-
pickleshare = 0.7.4
90-
prompt-toolkit = 1.0.15
91-
ptyprocess = 0.6.0
92-
scandir = 1.7
93-
simplegeneric = 0.8.1
94-
traitlets = 4.3.2
95-
wcwidth = 0.1.7
96-
# Required by:
97-
# collective.fingerpointing
98-
zc.lockfile = 1.2.1
99-
file-read-backwards = 1.2.2

test_plone51.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ allow-picked-versions = true
1313
[versions]
1414
setuptools = 42.0.2
1515
zc.buildout = 2.13.2
16-
16+
toml = 0.10.2
17+
traitlets = 4.3.2
1718
# Added by buildout at 2020-06-22 13:24:06.304460
1819
PyPDF2 = 1.26.0
1920
collective.behavior.talcondition = 0.11

test_plone52.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ allow-picked-versions = true
1313
[versions]
1414
setuptools = 42.0.2
1515
zc.buildout = 2.13.2
16-
16+
prompt-toolkit = 3.0.19
17+
toml = 0.10.2
1718
# Added by buildout at 2020-06-22 13:20:15.457149
1819
PyPDF2 = 1.26.0
1920
collective.behavior.talcondition = 0.11

0 commit comments

Comments
 (0)