Debian Codegraph @

ansible_collections/community/grafana/.github/workflows/ansible-test.yml

raw
1 name: CI
2 on:
3 push:
4 branches:
5 - main
6 pull_request:
7
8 jobs:
9 sanity:
10 runs-on: ubuntu-latest
11 name: Sanity (Ⓐ$${{ matrix.ansible_version }})
12 timeout-minutes: 30
13 strategy:
14 matrix:
15 python_version: ["3.12"]
16 ansible_version: ["v2.19.0b7", "stable-2.18", "stable-2.17"]
17 steps:
18 - name: Perform testing
19 uses: ansible-community/ansible-test-gh-action@release/v1
20 with:
21 ansible-core-version: ${{ matrix.ansible_version }}
22 origin-python-version: ${{ matrix.python_version }}
23 target-python-version: ${{ matrix.python_version }}
24 testing-type: sanity
25
26 units:
27 runs-on: ubuntu-latest
28 name: Units (Ⓐ$${{ matrix.ansible_version }})
29 timeout-minutes: 30
30 strategy:
31 matrix:
32 python_version: ["3.12"]
33 ansible_version: ["v2.19.0b7", "stable-2.18", "stable-2.17"]
34 steps:
35 - name: Perform testing
36 uses: ansible-community/ansible-test-gh-action@release/v1
37 with:
38 ansible-core-version: ${{ matrix.ansible_version }}
39 origin-python-version: ${{ matrix.python_version }}
40 target-python-version: ${{ matrix.python_version }}
41 testing-type: units
42
43 integration:
44 runs-on: ubuntu-latest
45 strategy:
46 fail-fast: false
47 matrix:
48 grafana_version: ["12.0.2", "11.6.3", "10.4.19"]
49 ansible_version: ["v2.19.0b7", "stable-2.18", "stable-2.17"]
50 python_version: ["3.12"]
51 services:
52 grafana:
53 image: grafana/grafana:${{ matrix.grafana_version }}
54 steps:
55 - name: Perform testing
56 uses: ansible-community/ansible-test-gh-action@release/v1
57 with:
58 ansible-core-version: ${{ matrix.ansible_version }}
59 target-python-version: ${{ matrix.python_version }}
60 testing-type: integration
61
62 molecule:
63 runs-on: ubuntu-latest
64 env:
65 PY_COLORS: 1
66 ANSIBLE_FORCE_COLOR: 1
67 strategy:
68 fail-fast: false
69 matrix:
70 grafana_version: ["12.0.2", "11.6.3", "10.4.19"]
71 ansible_version: ["v2.19.0b7", "stable-2.18", "stable-2.17"]
72 python_version: ["3.12"]
73 services:
74 grafana:
75 image: grafana/grafana:${{ matrix.grafana_version }}
76 ports: ["3000:3000"]
77 steps:
78 - name: Checkout repo
79 uses: actions/checkout@v4
80
81 - name: Set up Python
82 uses: actions/setup-python@v5
83 with:
84 python-version: ${{ matrix.python_version }}
85
86 - name: Install dependencies
87 run: |
88 python -m pip install --no-cache-dir --upgrade pip
89 pip install "git+https://github.com/ansible/ansible@${{ matrix.ansible_version }}" molecule molecule-plugins[docker] 'requests<2.32.0'
90
91 - name: Test with molecule
92 run: |
93 molecule --version
94 molecule test