grafana-ansible-collection/.github/workflows/ansible-test.yml

52 lines
1.7 KiB
YAML
Raw Normal View History

2022-08-11 07:09:04 +02:00
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 6 * * *'
env:
NAMESPACE: grafana
COLLECTION_NAME: grafana
2022-08-11 07:09:04 +02:00
jobs:
sanity:
name: Sanity (Ⓐ${{ matrix.ansible }})
strategy:
matrix:
ansible:
- stable-2.10
- stable-2.11
- stable-2.12
- devel
runs-on: ubuntu-latest
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.9'
2022-08-11 07:09:04 +02:00
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
2022-08-11 11:49:37 +02:00
- name: test
run: ansible-doc -t module grafana.grafana.alert_contact_point grafana.grafana.alert_notification_policy grafana.grafana.cloud_api_key grafana.grafana.cloud_plugin grafana.grafana.cloud_stack grafana.grafana.dashboard grafana.grafana.datasource grafana.grafana.folder
2022-08-11 07:09:04 +02:00
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
2022-08-11 11:49:37 +02:00
# - name: Run sanity tests
# run: ansible-test sanity --docker -v --color --coverage
# working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
2022-08-11 07:09:04 +02:00
2022-08-11 11:49:37 +02:00
# - name: Generate coverage report
# run: ansible-test coverage xml -v --requirements --group-by command --group-by version
# working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
2022-08-11 07:09:04 +02:00
2022-08-11 11:49:37 +02:00
# - uses: codecov/codecov-action@v3
# with:
# fail_ci_if_error: false