mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Going to Github Actions
This commit is contained in:
72
.github/workflows/telegraf.yml
vendored
Normal file
72
.github/workflows/telegraf.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
name: "community.zabbix.zabbix_server"
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'defaults/**'
|
||||
- 'files/**'
|
||||
- 'handlers/**'
|
||||
- 'meta/**'
|
||||
- 'molecule/**'
|
||||
- 'tasks/**'
|
||||
- 'templates/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'defaults/**'
|
||||
- 'files/**'
|
||||
- 'handlers/**'
|
||||
- 'meta/**'
|
||||
- 'molecule/**'
|
||||
- 'tasks/**'
|
||||
- 'templates/**'
|
||||
jobs:
|
||||
molecule:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
molecule_distro:
|
||||
- container: centos8
|
||||
image: geerlingguy/docker-centos8-ansible:latest
|
||||
- container: centos7
|
||||
image: geerlingguy/docker-centos7-ansible:latest
|
||||
- container: ubuntu2004
|
||||
image: geerlingguy/docker-ubuntu2004-ansible:latest
|
||||
- container: ubuntu1804
|
||||
image: geerlingguy/docker-ubuntu1804-ansible:latest
|
||||
- container: ubuntu1604
|
||||
image: geerlingguy/docker-ubuntu1604-ansible:latest
|
||||
- container: debian9
|
||||
image: geerlingguy/docker-debian9-ansible:latest
|
||||
- container: debian8
|
||||
image: geerlingguy/docker-debian8-ansible:latest
|
||||
collection_role:
|
||||
- zabbix_server
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r molecule/requirements.txt
|
||||
|
||||
- name: Build the collection
|
||||
run: |
|
||||
collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}'))
|
||||
echo "::set-env name=COLLECTION_FILE::$collection_file"
|
||||
|
||||
- name: Install the collection
|
||||
run: ansible-galaxy collection install $COLLECTION_FILE
|
||||
|
||||
- name: Run role tests
|
||||
run: >-
|
||||
MY_MOLECULE_CONTAINER=${{ matrix.molecule_distro.container }}
|
||||
MY_MOLECULE_IMAGE=${{ matrix.molecule_distro.image }}
|
||||
MY_MOLECULE_GROUP=${{ matrix.molecule_distro.group }}
|
||||
MY_MOLECULE_DOCKER_COMMAND=${{ matrix.molecule_distro.command }}
|
||||
molecule test -s ${{ matrix.collection_role }}
|
Reference in New Issue
Block a user