-
Notifications
You must be signed in to change notification settings - Fork 22
60 lines (57 loc) · 2.09 KB
/
logrotate.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
60
name: "ericsysmin.system.logrotate"
on:
push:
paths:
- 'roles/logrotate/**'
- 'molecule/logrotate/**'
- '.github/workflows/logrotate.yml'
pull_request:
paths:
- 'roles/logrotate/**'
- 'molecule/logrotate/**'
- '.github/workflows/logrotate.yml'
jobs:
logrotate:
runs-on: ubuntu-latest
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
fail-fast: true
matrix:
molecule_distro:
- { "distro":"centos-7", "command":"/usr/sbin/init" }
- { "distro":"centos-8", "command":"/usr/sbin/init" }
- { "distro":"fedora-32", "command":"/usr/sbin/init" }
- { "distro":"fedora-31", "command":"/usr/sbin/init" }
- { "distro":"fedora-30", "command":"/usr/lib/systemd/systemd" }
- { "distro":"ubuntu-16.04", "command":"/sbin/init" }
- { "distro":"ubuntu-18.04", "command":"/lib/systemd/systemd" }
- { "distro":"ubuntu-20.04", "command":"/lib/systemd/systemd" }
- { "distro":"debian-9", "command":"/lib/systemd/systemd" }
- { "distro":"debian-10", "command":"/lib/systemd/systemd" }
collection_role:
- logrotate
steps:
- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/ericsysmin/system
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
python -m pip install --upgrade pip
pip install ansible molecule yamllint ansible-lint molecule-plugins[docker]
- name: Run role tests
run: >-
molecule --version &&
ansible --version &&
MOLECULE_COMMAND=${{ matrix.molecule_distro.command }}
MOLECULE_DISTRO=${{ matrix.molecule_distro.distro }}
molecule --debug test -s ${{ matrix.collection_role }}