-
Notifications
You must be signed in to change notification settings - Fork 17
88 lines (79 loc) · 2.31 KB
/
integration.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
---
name: Collection integration
on:
pull_request:
types: [labeled]
push:
paths:
- "plugins/**"
- "tests/integration/**"
schedule:
- cron: 56 3 * * 2 # Run weekly
jobs:
integration-test:
name: Integration test Ansible ${{ matrix.ansible }} Py${{ matrix.python }}
if: ${{ github.event.label.name == 'automation' || github.ref_name == 'main' || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ansible_collections/vultr/cloud
strategy:
max-parallel: 1
fail-fast: false
matrix:
ansible:
- stable-2.17
python:
- "3.11"
steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/vultr/cloud
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install ansible-base (${{ matrix.ansible }})
run: |
python -m pip install --upgrade pip
pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Build and install collection
run: |
ansible-galaxy collection build .
ansible-galaxy collection install *.gz
- name: Add config file
env:
VULTR_CONFIG_FILE: ${{ secrets.VULTR_CONFIG_FILE }}
run: |
echo "$VULTR_CONFIG_FILE" > tests/integration/cloud-config-vultr.ini
- name: Ensure no other integration test is currently running
uses: softprops/turnstyle@v2
timeout-minutes: 60
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
same-branch-only: false
- name: Run the tests
run: >-
ansible-test
integration
--docker
-v
--color
--continue-on-error
--diff
--python ${{ matrix.python }}
--coverage
cloud/vultr/
- name: Generate coverage report
run: >-
ansible-test
coverage xml
-v
--requirements
--group-by command
--group-by version
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false