-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01a32cf
commit 87d8125
Showing
4 changed files
with
182 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
--- | ||
name: Modules Test | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
schedule: | ||
- cron: '0 6 * * *' | ||
env: | ||
NAMESPACE: grafana | ||
COLLECTION_NAME: grafana | ||
|
||
jobs: | ||
|
||
sanity: | ||
name: Sanity (Ⓐ${{ matrix.ansible }}) | ||
strategy: | ||
matrix: | ||
ansible: | ||
- stable-2.12 | ||
- stable-2.13 | ||
- stable-2.14 | ||
- devel | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
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: Run sanity tests | ||
run: ansible-test sanity -v --docker --color --coverage | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
integration: | ||
runs-on: ubuntu-20.04 | ||
name: Integration (Ⓐ${{ matrix.ansible }}-py${{ matrix.python }}) | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 1 | ||
matrix: | ||
ansible: | ||
- stable-2.13 | ||
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 }} | ||
grafana_url: ${{ secrets.ANSIBLE_GRAFANA_URL }} | ||
test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }} | ||
EOF | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install ansible-base (${{ matrix.ansible }}) | ||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check | ||
|
||
- name: Install Requests | ||
run: pip install requests | ||
|
||
- name: Test module alert_contact_point | ||
run: ansible-test integration -v alert_contact_point --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module alert_notification_policy | ||
run: ansible-test integration -v alert_notification_policy --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module cloud_api_key | ||
run: ansible-test integration -v cloud_api_key --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module cloud_plugin | ||
run: ansible-test integration -v cloud_plugin --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module cloud_stack | ||
run: ansible-test integration -v cloud_stack --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module dashboard | ||
run: ansible-test integration -v dashboard --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module datasource | ||
run: ansible-test integration -v datasource --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} | ||
|
||
- name: Test module folder | ||
run: ansible-test integration -v folder --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker | ||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters