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
67on :
78 push :
89 pull_request :
910
1011jobs :
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 }}
0 commit comments