-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (130 loc) · 4.37 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Push tests
# run-name: ${{ github.actor }} push tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- python: 2.7.18
plone: 4.3
- python: 3.7.14
plone: 5.2
- python: 3.10.11
plone: "6.0"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up pyenv and Python
uses: "gabrielfalcao/pyenv-action@v14"
with:
default: "${{ matrix.python }}"
- name: Setup Env
run: |
sudo apt-get update -qqy
sudo apt-get install -qqy g++ libpng-dev cmake libqt5widgets5 qttools5-dev
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
tar -xf zint-2.8.0.tar.gz
cd zint-2.8.0
sudo cmake .
sudo make
sudo make install
cd ..
pip install --upgrade pip
pip install -r requirements-${{ matrix.plone }}.txt
- name: Cache eggs
uses: actions/cache@v3
env:
cache-name: cache-eggs
with:
path: ~/buildout-cache/eggs
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.python }}-${{ matrix.plone }}
# - name: Cache eggs restore
# id: cache-restore
# uses: actions/cache/restore@v3
# env:
# cache-name: cache-eggs
# with:
# path: ~/buildout-cache/eggs
# key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.python }}-${{ matrix.plone }}
- name: buildout
run: |
sed -ie "s#test.cfg#test-${{matrix.plone}}.cfg#" gha.cfg
buildout -c gha.cfg annotate
buildout -c gha.cfg
# - name: Cache eggs save
# uses: actions/cache/save@v3
# with:
# path: ~/buildout-cache/eggs
# key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- name: test
run: |
bin/test -t !robot
coverage:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- python: 2.7.18
plone: "4.3"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up pyenv and Python
uses: "gabrielfalcao/pyenv-action@v14"
with:
default: "${{ matrix.python }}"
- name: Setup Env
run: |
sudo apt-get update -qqy
sudo apt-get install -qqy g++ libpng-dev cmake libqt5widgets5 qttools5-dev
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
tar -xf zint-2.8.0.tar.gz
cd zint-2.8.0
sudo cmake .
sudo make
sudo make install
cd ..
pip install --upgrade pip
pip install -r requirements-${{ matrix.plone }}.txt
pip install --upgrade pip
pip install -r requirements-${{matrix.plone}}.txt
pip install -U coveralls coverage
- name: Cache eggs
uses: actions/cache@v3
env:
cache-name: cache-eggs
with:
path: ~/buildout-cache/eggs
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.python }}-${{ matrix.plone }}
restore-keys: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.python }}-${{ matrix.plone }}
- name: buildout
run: |
sed -ie "s#test.cfg#test-${{matrix.plone}}.cfg#" gha.cfg
buildout -c gha.cfg
- name: code-analysis
run: |
bin/code-analysis
- name: test coverage
run: |
coverage run bin/test -t !robot
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Coveralls
run: |
pip3 install -U pip setuptools --no-cache-dir
pip3 install -U "coveralls>=3.0.0" coverage==5.3.1 --no-cache-dir
- name: Publish to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github