-
Notifications
You must be signed in to change notification settings - Fork 83
94 lines (87 loc) · 2.77 KB
/
ansible-test.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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
sanity:
runs-on: ubuntu-latest
name: Sanity (Ⓐ$${{ matrix.ansible_version }})
timeout-minutes: 30
strategy:
matrix:
python_version: ["3.11"]
ansible_version: ["stable-2.15", "stable-2.16", "devel"]
steps:
- name: Perform testing
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: ${{ matrix.ansible_version }}
origin-python-version: ${{ matrix.python_version }}
target-python-version: ${{ matrix.python_version }}
testing-type: sanity
units:
runs-on: ubuntu-latest
name: Units (Ⓐ$${{ matrix.ansible_version }})
timeout-minutes: 30
strategy:
matrix:
python_version: ["3.11"]
ansible_version: ["stable-2.15", "stable-2.16", "devel"]
steps:
- name: Perform testing
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: ${{ matrix.ansible_version }}
origin-python-version: ${{ matrix.python_version }}
target-python-version: ${{ matrix.python_version }}
testing-type: units
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
grafana_version: ["11.2.0", "10.4.8", "9.5.20"]
ansible_version: ["stable-2.15", "stable-2.16", "devel"]
python_version: ["3.11"]
services:
grafana:
image: grafana/grafana:${{ matrix.grafana_version }}
steps:
- name: Perform testing
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: ${{ matrix.ansible_version }}
target-python-version: ${{ matrix.python_version }}
testing-type: integration
molecule:
runs-on: ubuntu-latest
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
fail-fast: false
matrix:
grafana_version: ["11.2.0", "10.4.8", "9.5.20"]
ansible_version: ["stable-2.15", "stable-2.16", "devel"]
python_version: ["3.11"]
services:
grafana:
image: grafana/grafana:${{ matrix.grafana_version }}
ports: ["3000:3000"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --no-cache-dir --upgrade pip
pip install "git+https://github.com/ansible/ansible@${{ matrix.ansible_version }}" molecule molecule-plugins[docker] 'requests<2.32.0'
- name: Test with molecule
run: |
molecule --version
molecule test