-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathans-int-test-lkp-activation.yaml
More file actions
120 lines (109 loc) · 3.53 KB
/
Copy pathans-int-test-lkp-activation.yaml
File metadata and controls
120 lines (109 loc) · 3.53 KB
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
# README:
# - When changing the module name, it needs to be changed in 'env:MODULE_NAME' and in 'on:pull_requests:path'!
#
# Resources:
# - Template for this file: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
# - About Ansible integration tests: https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
env:
NAMESPACE: checkmk
COLLECTION_NAME: general
MODULE_NAME: lookup_activation
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Ansible Integration Tests for Activation Lookup Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
- devel
paths:
- 'plugins/lookup/activation.py'
push:
paths:
- '.github/workflows/ans-int-test-lkp-activation.yaml'
- 'plugins/lookup/activation.py'
- 'plugins/module_utils/**'
- 'tests/integration/files/includes/**'
- 'tests/integration/targets/lookup_activation/**'
jobs:
integration:
runs-on: ubuntu-24.04
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.18
- stable-2.19
- stable-2.20
- devel
python:
- '3.11'
- '3.12'
- '3.13'
exclude:
# Exclude unsupported sets.
- ansible: devel
python: '3.11'
- ansible: stable-2.20
python: '3.11'
services:
ancient_cre:
image: checkmk/check-mk-raw:2.2.0p47
ports:
- 5022:5000
env:
CMK_SITE_ID: "ancient_cre"
CMK_PASSWORD: "Sup3rSec4et!"
old_cre:
image: checkmk/check-mk-raw:2.3.0p41
ports:
- 5023:5000
env:
CMK_SITE_ID: "old_cre"
CMK_PASSWORD: "Sup3rSec4et!"
old_cme:
image: checkmk/check-mk-managed:2.3.0p41
ports:
- 5323:5000
env:
CMK_SITE_ID: "old_cme"
CMK_PASSWORD: "Sup3rSec4et!"
stable_cre:
image: checkmk/check-mk-raw:2.4.0p18
ports:
- 5024:5000
env:
CMK_SITE_ID: "stable_cre"
CMK_PASSWORD: "Sup3rSec4et!"
stable_cme:
image: checkmk/check-mk-managed:2.4.0p18
ports:
- 5324:5000
env:
CMK_SITE_ID: "stable_cme"
CMK_PASSWORD: "Sup3rSec4et!"
steps:
- name: Check out code
uses: actions/checkout@v6
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: "Install uv and set the python version."
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python }}
enable-cache: true
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/
- name: "Setup uv venv."
run: uv venv
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Install ansible-base (${{ matrix.ansible }})
run: uv pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Run integration test
run: uv run ansible-test integration ${{env.MODULE_NAME}} -v --color --continue-on-error --diff --python ${{ matrix.python }}
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}