-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (56 loc) · 1.59 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
name: tests
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 12 * * 0" # run once a week on Sunday
jobs:
build:
strategy:
matrix:
config:
- ["Py3.7-Plone5.2", "3.7"]
- ["Py3.8-Plone5.2", "3.8"]
runs-on: ubuntu-latest
name: ${{ matrix.config[0] }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config[1] }}
- name: Install necessary dependencies
run: |
sudo apt update
sudo apt install -y wkhtmltopdf
sudo apt install -y libldap2-dev libsasl2-dev libssl-dev
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cache/pip
**/eggs
**/downloads
key: ${{ runner.os }}-cache-${{ hashFiles('setup.*', '*.cfg') }}-${{ matrix.config[0] }}
restore-keys: |
${{ runner.os }}-cache-
- name: Install dependencies
run: |
sudo locale-gen en_US.UTF-8 nl_NL@euro
python -m venv .
bin/pip install -r requirements.txt
bin/buildout -c .github.cfg
- name: Pre commit
uses: pre-commit/[email protected]
if: ${{ matrix.config[1] == '3.8' }}
- name: Code Analysis
run: |
bin/code-analysis
if: ${{ matrix.config[1] == '3.8' }}
- name: Test
run: |
bin/coverage run bin/test -s osha.oira
bin/coverage report --fail-under=38 -i
env:
zope_i18n_compile_mo_files: 1