2020-11-03 16:51:34 +01:00
|
|
|
---
|
|
|
|
name: CI
|
|
|
|
'on':
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
schedule:
|
|
|
|
- cron: "0 5 * * 0"
|
|
|
|
|
2020-11-03 16:58:34 +01:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: 'geerlingguy.apache'
|
|
|
|
|
2020-11-03 16:59:11 +01:00
|
|
|
# See: https://github.com/ansible/galaxy/issues/46
|
|
|
|
# notifications:
|
|
|
|
# webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
|
|
|
|
2020-11-03 16:51:34 +01:00
|
|
|
jobs:
|
|
|
|
|
2020-11-03 16:58:34 +01:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out the codebase.
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: 'geerlingguy.apache'
|
|
|
|
|
|
|
|
- name: Set up Python 3.
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
|
|
|
|
- name: Install test dependencies.
|
|
|
|
run: pip3 install yamllint ansible-lint
|
|
|
|
|
|
|
|
- name: Lint code.
|
|
|
|
run: |
|
|
|
|
yamllint .
|
|
|
|
ansible-lint
|
|
|
|
|
|
|
|
molecule:
|
2020-11-03 16:51:34 +01:00
|
|
|
name: Molecule
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-11-03 16:58:34 +01:00
|
|
|
distro:
|
2020-11-03 16:51:34 +01:00
|
|
|
- centos8
|
|
|
|
- centos7
|
|
|
|
- ubuntu2004
|
|
|
|
- debian10
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out the codebase.
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: 'geerlingguy.apache'
|
|
|
|
|
|
|
|
- name: Set up Python 3.
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
|
|
|
|
- name: Install test dependencies.
|
2020-11-03 16:58:34 +01:00
|
|
|
run: pip3 install molecule[docker]
|
2020-11-03 16:51:34 +01:00
|
|
|
|
|
|
|
- name: Run Molecule tests.
|
2020-11-03 16:58:34 +01:00
|
|
|
run: |
|
|
|
|
cd molecule
|
|
|
|
molecule test
|
2020-11-03 16:51:34 +01:00
|
|
|
env:
|
|
|
|
PY_COLORS: '1'
|
|
|
|
ANSIBLE_FORCE_COLOR: '1'
|
|
|
|
MOLECULE_DISTRO: ${{ matrix.distro }}
|