65 lines
1.7 KiB
Django/Jinja
65 lines
1.7 KiB
Django/Jinja
---
|
|
{{ ansible_managed | comment }}
|
|
|
|
name: Ansible Molecule
|
|
|
|
on:
|
|
push:
|
|
tags_ignore:
|
|
- '*'
|
|
pull_request:
|
|
schedule:
|
|
- cron: '{{ letter_minute_mapping[role_name[0]] }} {{ letter_hour_mapping[role_name[0]] }} {{ letter_day_mapping[role_name[0]] }} * *'
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
- name: molecule
|
|
uses: robertdebock/molecule-action@2.2.0
|
|
with:
|
|
entrypoint: /usr/local/bin/molecule
|
|
args: lint
|
|
test:
|
|
needs:
|
|
- lint
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
{% for platform in meta.galaxy_info.platforms %}
|
|
{% for version in platform.versions %}
|
|
{% for tag in distribution_version_mapping[platform.name][version] %}
|
|
- image: "{{ platform_image_mapping[platform.name] }}"
|
|
tag: "{{ tag }}"
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: {% raw %}"${{ github.repository }}"{% endraw %}
|
|
|
|
- name: disable apparmor for mysql
|
|
run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
|
|
- name: parse apparmor for mysql
|
|
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
|
|
- name: molecule
|
|
uses: robertdebock/molecule-action@2.2.0
|
|
with:
|
|
image: {% raw %}${{ matrix.config.image }}{% endraw %}
|
|
|
|
tag: {% raw %}${{ matrix.config.tag }}{% endraw %}
|
|
|
|
{% if tox_parallel is defined %}
|
|
{% if tox_parallel %}
|
|
options: "--parallel all"
|
|
env:
|
|
TOX_PARALLEL_NO_SPINNER: 1
|
|
{% endif %}
|
|
{% endif %}
|