-
Notifications
You must be signed in to change notification settings - Fork 87
69 lines (60 loc) · 2.08 KB
/
full-integration-test.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
---
name: Full Integration Test
# yamllint disable-line rule:truthy
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
env:
NAMESPACE: grafana
COLLECTION_NAME: grafana
jobs:
integration:
runs-on: ubuntu-20.04
name: ${{ matrix.ansible }}-py${{ matrix.python }}
strategy:
fail-fast: true
max-parallel: 1
matrix:
ansible:
- stable-2.11
- stable-2.12
- stable-2.13
- devel
python:
- '2.7'
- '3.5'
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
exclude:
- ansible: stable-2.11
python: '3.10'
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: create integration_config
working-directory: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration
run: |
cat <<EOF > integration_config.yml
stack_name: ${{ secrets.ANSIBLE_TEST_STACK_NAME }}
org_name: ${{ secrets.ANSIBLE_TEST_ORG_NAME }}
grafana_cloud_api_key: ${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }}
grafana_api_key: ${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }}
test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }}
EOF
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Test Modules
run: ansible-test integration -v alert_contact_point alert_notification_policy cloud_api_key cloud_plugin cloud_stack dashboard datasource folder --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Cooling Period
run: sleep 3m