generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 7
88 lines (78 loc) · 2.24 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
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
---
name: Molecule CI/CD
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main
push:
branches:
- main
ignore-tags:
- "*"
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
ansible-lint:
name: Ansible Lint
runs-on: ubuntu-22.04
steps:
- name: Check out the codebase
uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install Ansible Lint
run: pip3 install -r .github/workflows/requirements/requirements_ansible_lint.txt
- name: Install Ansible collection dependencies
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml
- name: Run Ansible Lint
run: ansible-lint --force-color
molecule:
name: Molecule
runs-on: ubuntu-22.04
env:
NGINX_CRT: ${{ secrets.NGINX_CRT }}
NGINX_KEY: ${{ secrets.NGINX_KEY }}
strategy:
fail-fast: false
matrix:
scenario:
- default-set1
- default-set2
- plus-set1
- plus-set2
- upgrade-set1
- upgrade-set2
- all-nms-modules-set1
- all-nms-modules-set2
- ga-nms-modules-set1
- ga-nms-modules-set2
- plus-count-ubuntu
- plus-count-rhel
- plus-count-upgrade
- service-stopped-set1
- service-stopped-set2
needs: ansible-lint
steps:
- name: Check out the codebase
uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install Molecule dependencies
run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt
- name: Install Ansible collection dependencies
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml
- name: Check Disk Space
run: df -h
- name: Run Molecule tests
run: molecule test -s ${{ matrix.scenario }}
# continue-on-error: true
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
- name: Check Disk Space (Post)
run: df -h