Skip to content

Commit 78f4701

Browse files
committed
fix: move inventory into parallel
1 parent d7ec4f6 commit 78f4701

4 files changed

Lines changed: 47 additions & 35 deletions

File tree

.github/workflows/baremetal.yaml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -109,37 +109,3 @@ jobs:
109109
dd if=/dev/zero bs=4k count=4 of=ansible_collections/serverscom/sc_api/tests/integration/integration_config.yml
110110
sync
111111
sync
112-
113-
inventory:
114-
runs-on: ubuntu-24.04
115-
needs:
116-
- server1
117-
- server2
118-
- server3
119-
steps:
120-
- name: Checkout
121-
uses: actions/checkout@v6
122-
- name: Set up Python
123-
uses: actions/setup-python@v6
124-
with:
125-
python-version: "3.13"
126-
- name: Install dependencies
127-
run: |
128-
python -m pip install --upgrade pip
129-
pip install -r requirements.txt
130-
- name: Configure integration tests
131-
run: |
132-
envsubst < integration_config.yml.template > ansible_collections/serverscom/sc_api/tests/integration/integration_config.yml
133-
env:
134-
SC_TOKEN: "${{ secrets.SC_TOKEN }}"
135-
- name: Integration tests
136-
run: ansible-test integration --requirements --python 3.13 --color yes
137-
sc_inventory
138-
139-
working-directory: ansible_collections/serverscom/sc_api
140-
- name: Cleanup secrets
141-
if: always()
142-
run: |
143-
dd if=/dev/zero bs=4k count=4 of=ansible_collections/serverscom/sc_api/tests/integration/integration_config.yml
144-
sync
145-
sync

.github/workflows/inventory.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Inventory integration tests
3+
4+
"on":
5+
workflow_call:
6+
7+
concurrency:
8+
group: inventory
9+
cancel-in-progress: false
10+
11+
jobs:
12+
inventory:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v6
17+
- name: Set up Python
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version: "3.13"
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
- name: Configure integration tests
26+
run: |
27+
envsubst < integration_config.yml.template > ansible_collections/serverscom/sc_api/tests/integration/integration_config.yml
28+
env:
29+
SC_TOKEN: "${{ secrets.SC_TOKEN }}"
30+
- name: Integration tests
31+
run: ansible-test integration --requirements --python 3.13 --color yes
32+
sc_inventory
33+
34+
working-directory: ansible_collections/serverscom/sc_api
35+
- name: Cleanup secrets
36+
if: always()
37+
run: |
38+
dd if=/dev/zero bs=4k count=4 of=ansible_collections/serverscom/sc_api/tests/integration/integration_config.yml
39+
sync
40+
sync

.github/workflows/l2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: L2 integration tests
55
workflow_call:
66

77
concurrency:
8-
group: baremetal
8+
group: l2
99
cancel-in-progress: false
1010

1111
jobs:

.github/workflows/tests.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ jobs:
114114
uses: ./.github/workflows/baremetal.yaml
115115
secrets: inherit
116116

117+
inventory:
118+
needs: baremetal
119+
uses: ./.github/workflows/inventory.yaml
120+
secrets: inherit
121+
117122
l2:
118123
needs: baremetal
119124
uses: ./.github/workflows/l2.yaml
@@ -241,6 +246,7 @@ jobs:
241246
needs:
242247
- baremetal
243248
- integration_tests_cloud
249+
- inventory
244250
- l2
245251
- integration_tests_lb_instances
246252
- integration_tests_rbs_volumes

0 commit comments

Comments
 (0)