Skip to content

Commit b55aa77

Browse files
authored
ansible-tests - add new integration tests on Docker Image (#156)
1 parent 5303f96 commit b55aa77

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/ansible-test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,44 @@ jobs:
147147
test-deps: ansible.netcommon
148148
pull-request-change-detection: true
149149
150+
###
151+
# Docker Integration tests (OPTIONAL)
152+
#
153+
# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
154+
155+
docker-integration:
156+
runs-on: ubuntu-latest
157+
158+
name: Docker Integration (Ⓐ${{ matrix.ansible }}+image-${{ matrix.image }})
159+
strategy:
160+
fail-fast: false
161+
matrix:
162+
ansible:
163+
- stable-2.18
164+
# - milestone
165+
image:
166+
- alpine320
167+
- fedora40
168+
- ubuntu2204
169+
- ubuntu2404
170+
171+
172+
steps:
173+
- name: >-
174+
Perform integration testing against
175+
Ansible version ${{ matrix.ansible }}
176+
on Docker image ${{ matrix.image }}
177+
id: docker_integration_tests
178+
uses: ansible-community/ansible-test-gh-action@release/v1
179+
with:
180+
ansible-core-version: ${{ matrix.ansible }}
181+
docker-image: ${{ matrix.image }}
182+
codecov-token: ${{ secrets.CODECOV_TOKEN }}
183+
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
184+
testing-type: integration
185+
test-deps: ansible.netcommon
186+
pull-request-change-detection: true
187+
150188
check: # This job does nothing and is only used for the branch protection
151189
# or multi-stage CI jobs, like making sure that all tests pass before
152190
# a publishing job is started.
@@ -156,6 +194,7 @@ jobs:
156194
- sanity
157195
- units
158196
- integration
197+
- docker-integration
159198

160199
runs-on: ubuntu-latest
161200

tests/integration/targets/charts/tasks/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
block:
88

99
- name: Run tests
10-
import_tasks: tests.yml
10+
import_tasks: tests.yml
11+
12+
when: >
13+
ansible_distribution == 'Fedora' or
14+
(ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('15.04', '>='))

0 commit comments

Comments
 (0)