-
-
Notifications
You must be signed in to change notification settings - Fork 77
106 lines (96 loc) · 2.73 KB
/
tests.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: molecule test
on:
pull_request:
branches:
- master
- main
- devel*
types: [opened, synchronize, reopened]
paths:
- 'defaults/**'
- 'handlers/**'
- 'molecule/**'
- 'tasks/**'
- 'templates/**'
- 'vars/**'
schedule:
- cron: '0 6 * * 0'
workflow_dispatch:
env:
MOLECULE_DOCKER_VOLUMES: rw
MOLECULE_DOCKER_CGROUPS_MODE: host
jobs:
repo:
name: Test GHA Runner Role
environment:
name: test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 5
matrix:
config:
- os: "debian11"
- os: "fedora39"
- os: "ubuntu20"
- os: "ubuntu22"
- os: "rockylinux8"
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install test dependencies
run: |
pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" jmespath
- name: Run Molecule test - repo
run: molecule test --scenario-name repo
working-directory: "${{ github.repository }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_IMAGE: ${{ matrix.config.os }}
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
org:
name: Test Org Runner
needs: repo
environment:
name: test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 5
matrix:
config:
- os: "debian11"
- os: "fedora37"
- os: "ubuntu20"
- os: "ubuntu22"
- os: "rockylinux8"
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install test dependencies
run: pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" jmespath
- name: Run Molecule tests -
run: molecule test --scenario-name org
working-directory: "${{ github.repository }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_IMAGE: ${{ matrix.config.os }}
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}