forked from mit-scripts/ansible-pacemaker-corosync
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (53 loc) · 1.55 KB
/
main.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
name: Molecule
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
molecule:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
fail-fast: false
matrix:
scenario:
- tag: centos-systemd:stream9
user: quay.io/gotmax23
- tag: debian-systemd:12
user: quay.io/gotmax23
- tag: ubuntu-systemd:20.04
user: quay.io/gotmax23
- tag: ubuntu-systemd:22.04
user: quay.io/gotmax23
python-version:
- 3.10
ansible-version:
- 2.17.0
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ${{ github.repository }}/test-requirements.txt
- name: Install ansible
run: |
python3 -m pip install ansible-core==${{ matrix.ansible-version }}
- name: Install ansible collections
run: |
ansible-galaxy install -r ${{ github.repository }}/test-requirements.yml
- name: Test with molecule
run: |
cd ${{ github.repository }}
export docker_image_tag="${{ matrix.scenario.tag }}"
export docker_user="${{ matrix.scenario.user }}"
python3 -m molecule test