This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
61 lines (57 loc) · 2.26 KB
/
run-e2e-tests.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
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
compile_code:
runs-on: ubuntu-latest
strategy:
matrix:
python_version:
- 2.7
- 3.6
- 3.7
- 3.8
steps:
- uses: actions/checkout@v2
- name: setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: compile code
run: python -m py_compile check_mk_web_api/*.py
run_e2e:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
checkmk_version:
- "1.5"
- "1.6"
- "2.0"
steps:
- uses: actions/checkout@v2
- name: setup Python
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: start and preconfigure checkmk
run: |
docker run -d --rm -p 127.0.0.1:8080:5000 --name check-mk checkmk/check-mk-raw:${{ matrix.checkmk_version }}.0-latest
set +e
max_retry=300
counter=0
until docker exec -u cmk check-mk bash -c "echo automation-secret > /omd/sites/cmk/var/check_mk/web/automation/automation.secret" > /dev/null
do
sleep 1
[[ counter -eq $max_retry ]] && echo "failed to set password after $counter tries...giving up" && exit 1
echo "#$counter: failed to set password. trying again..."
((counter++))
done
echo Successfully set automation user password
- name: execute E2E tests
run: |
CHECK_MK_URL=http://localhost:8080/cmk/check_mk CHECK_MK_USER=automation CHECK_MK_SECRET=automation-secret CHECK_MK_VERSION="${{ matrix.checkmk_version }}" python setup.py test