-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmolecule.yml
59 lines (52 loc) · 1.82 KB
/
molecule.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
name: Molecule
on:
workflow_dispatch:
pull_request:
push:
schedule:
- cron: '30 1 * * 3'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
outputs:
container_supported: ${{ steps.get_min_ansible_container_version.outputs.result }}
steps:
- name: Check out the codebase
uses: actions/checkout@v4
- name: Pull Lint image
run: docker pull -q ghcr.io/rheinwerk/molecule:lint
- name: Ansible Linting
run: docker run --rm -v ${GITHUB_WORKSPACE}:/git -w /git ghcr.io/rheinwerk/molecule:lint ansible-lint --force-color -p --offline /git
- name: Yaml Linting
run: docker run --rm -v ${GITHUB_WORKSPACE}:/git -w /git ghcr.io/rheinwerk/molecule:lint yamllint -f colored /git
- name: Get min_ansible_container_version from meta/main.yml
id: get_min_ansible_container_version
uses: mikefarah/yq@master
with:
cmd: yq ".galaxy_info.min_ansible_container_version" ${GITHUB_WORKSPACE}/meta/main.yml
molecule:
name: Molecule for Ansible ${{ matrix.ansible_scenario }} / ${{ matrix.distro }} / Python ${{ matrix.python_version }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
needs: lint
if: needs.lint.outputs.container_supported != 'X'
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu-20.04
ansible_scenario: ansible_current
experimental: false
- distro: ubuntu-20.04
ansible_scenario: ansible_next
experimental: true
- distro: ubuntu-22.04
ansible_scenario: ansible_latest
experimental: true
steps:
- uses: Rheinwerk/molecule@main
with:
distro: ${{ matrix.distro }}
ansible_scenario: ${{ matrix.ansible_scenario }}