Skip to content

Commit 3b335ac

Browse files
committed
ci: add integration run of changed on PR
1 parent eee615e commit 3b335ac

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Collection integration of changed
2+
3+
on:
4+
pull_request:
5+
push:
6+
paths:
7+
- "plugins/**"
8+
- "tests/integration/**"
9+
10+
jobs:
11+
integration-test:
12+
name: Integration of changes v${{ matrix.container-version }} Ansible-${{ matrix.ansible-branch }} Py${{ matrix.python-version }}
13+
defaults:
14+
run:
15+
working-directory: ansible_collections/ngine_io/cloudstack
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version:
21+
- "3.11"
22+
ansible-branch:
23+
- stable-2.17
24+
container-version:
25+
- 1.6.1
26+
- 1.4.0
27+
steps:
28+
- name: Check out code
29+
uses: actions/checkout@v4
30+
with:
31+
path: ansible_collections/ngine_io/cloudstack
32+
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
38+
- name: Install ansible and collection dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-branch }}.tar.gz
42+
pip install -r requirements.txt
43+
44+
- name: Build and install collection
45+
run: |
46+
ansible-galaxy collection build .
47+
ansible-galaxy collection install *.gz
48+
49+
- name: Run the tests
50+
run: >-
51+
ansible-test
52+
integration
53+
--docker
54+
-v
55+
--diff
56+
--color
57+
--retry-on-error
58+
--python ${{ matrix.python-version }}
59+
--changed
60+
env:
61+
ANSIBLE_CLOUDSTACK_CONTAINER: quay.io/ansible/cloudstack-test-container:${{ matrix.container-version }}

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
defaults:
1818
run:
1919
working-directory: ansible_collections/ngine_io/cloudstack
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
strategy:
2222
fail-fast: false
2323
matrix:

0 commit comments

Comments
 (0)