124 lines
2.7 KiB
Django/Jinja
124 lines
2.7 KiB
Django/Jinja
---
|
|
{{ ansible_managed | comment }}
|
|
|
|
name: Ansible Molecule
|
|
|
|
on:
|
|
push:
|
|
tags_ignore:
|
|
- '*'
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
- name: molecule
|
|
uses: robertdebock/molecule-action@1.1.3
|
|
with:
|
|
image: {% raw %}${{ matrix.image }}{% endraw %}
|
|
|
|
entrypoint: /usr/local/bin/molecule
|
|
args: lint
|
|
test:
|
|
needs:
|
|
- lint
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
image:
|
|
{% for platform in meta.galaxy_info.platforms %}
|
|
{% if platform.name == "Amazon" %}
|
|
- amazonlinux
|
|
{% elif platform.name == "EL" %}
|
|
- centos
|
|
{% else %}
|
|
- {{ platform.name | lower }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
tag:
|
|
- 1
|
|
- 7
|
|
- edge
|
|
- latest
|
|
- rawhide
|
|
- unstable
|
|
exclude:
|
|
- image: alpine
|
|
tag: 1
|
|
- image: alpine
|
|
tag: 7
|
|
- image: alpine
|
|
tag: rawhide
|
|
- image: alpine
|
|
tag: unstable
|
|
- image: amazonlinux
|
|
tag: 7
|
|
- image: amazonlinux
|
|
tag: edge
|
|
- image: amazonlinux
|
|
tag: rawhide
|
|
- image: amazonlinux
|
|
tag: unstable
|
|
- image: debian
|
|
tag: 1
|
|
- image: debian
|
|
tag: 7
|
|
- image: debian
|
|
tag: edge
|
|
- image: debian
|
|
tag: rawhide
|
|
- image: centos
|
|
tag: 1
|
|
- image: centos
|
|
tag: edge
|
|
- image: centos
|
|
tag: rawhide
|
|
- image: centos
|
|
tag: unstable
|
|
- image: fedora
|
|
tag: 1
|
|
- image: fedora
|
|
tag: 7
|
|
- image: fedora
|
|
tag: edge
|
|
- image: fedora
|
|
tag: unstable
|
|
- image: opensuse
|
|
tag: 1
|
|
- image: opensuse
|
|
tag: 7
|
|
- image: opensuse
|
|
tag: edge
|
|
- image: opensuse
|
|
tag: rawhide
|
|
- image: opensuse
|
|
tag: unstable
|
|
- image: ubuntu
|
|
tag: 1
|
|
- image: ubuntu
|
|
tag: 7
|
|
- image: ubuntu
|
|
tag: edge
|
|
- image: ubuntu
|
|
tag: rawhide
|
|
- image: ubuntu
|
|
tag: unstable
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: {% raw %}"${{ github.repository }}"{% endraw %}
|
|
|
|
- name: molecule
|
|
uses: robertdebock/molecule-action@1.1.3
|
|
with:
|
|
image: {% raw %}${{ matrix.image }}{% endraw %}
|
|
|
|
{% if tox_parallel is defined %}
|
|
{% if tox_parallel %}
|
|
options: "--parallel all"
|
|
{% endif %}
|
|
{% endif %}
|