Merge pull request #217 from ericsysmin/gcloud_role

This commit is contained in:
Alex Stephen 2020-05-13 16:04:51 -04:00 committed by GitHub
commit 8d231272a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 600 additions and 0 deletions

62
.github/workflows/gcloud.yml vendored Normal file
View file

@ -0,0 +1,62 @@
name: "google.cloud.gcloud"
on:
push:
paths:
- 'roles/gcloud/**'
- '.github/workflows/gcloud.yml'
- 'molecule/gcloud/**'
pull_request:
paths:
- 'roles/gcloud/**'
- '.github/workflows/gcloud.yml'
- 'molecule/gcloud/**'
jobs:
molecule:
runs-on: ubuntu-18.04
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
fail-fast: true
matrix:
molecule_playbook:
- archive_playbook.yml
- package_playbook.yml
molecule_distro:
- distro: centos:7
command: /usr/sbin/init
- distro: centos:8
command: /usr/sbin/init
- distro: ubuntu:16.04
command: /sbin/init
- distro: ubuntu:18.04
command: /lib/systemd/systemd
- distro: debian:9
command: /lib/systemd/systemd
collection_role:
- gcloud
steps:
- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/google/cloud
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt install docker
python -m pip install --upgrade pip
pip install molecule yamllint ansible-lint docker
- name: Run role test
run: >-
molecule --version &&
ansible --version &&
MOLECULE_COMMAND=${{ matrix.molecule_distro.command }}
MOLECULE_DISTRO=${{ matrix.molecule_distro.distro }}
MOLECULE_PLAYBOOK=${{ matrix.molecule_playbook }}
molecule --debug test -s ${{ matrix.collection_role }}