-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (75 loc) · 2.22 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
name: CI
on: [push]
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Black
run: pip install black
- name: Run black --check .
run: black --check .
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plone-version:
- '4.3'
- '5.0'
- '5.1'
- '5.2'
python-version: ['2.7']
include:
- plone-version: 5.2
python-version: 3.6
- plone-version: 5.2
python-version: 3.7
- plone-version: 5.2
python-version: 3.8
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libxml2-dev libxslt-dev python-dev
pip install virtualenv wheel
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/buildout-cache
~/extends
~/.cache/pip
key: ${{ runner.os }}-buildout-${{ matrix.plone-version }}-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-buildout-
- name: setup buildout cache
run: |
mkdir -p ~/buildout-cache/{eggs,downloads}
mkdir ~/.buildout
echo "[buildout]" > ~/.buildout/default.cfg
echo "download-cache = ~/buildout-cache/downloads" >> ~/.buildout/default.cfg
echo "eggs-directory = ~/buildout-cache/eggs" >> ~/.buildout/default.cfg
- name: buildout
run: |
sed -ie "s#test-5.0.x.cfg#test-${{ matrix.plone-version }}.x.cfg#" buildout.cfg
pip install -r requirements.txt
buildout -Nc buildout.cfg
- name: test
run: |
bin/test --all
- name: code-analysis
run: bin/code-analysis
- uses: actions/setup-python@v2
if: failure()
with:
python-version: 2.7