-
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (39 loc) · 1.16 KB
/
ci.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
---
name: CI
'on':
pull_request:
push:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Install test dependencies.
run: pip3 install ansible ansible-lint
- name: Lint ansible.
run: ansible-lint
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-software
install:
name: Playbook
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12]
playbook:
- deekayen-macbook
- dnorman-macbook
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Install ansible.
run: brew install ansible
- name: Install galaxy dependencies.
run: ansible-galaxy install -r roles/requirements.yml
- name: Check syntax.
run: ansible-playbook --syntax-check --list-tasks -i 127.0.0.1, ${{ matrix.playbook }}.yml
- name: Run playbook.
run: ansible-playbook --diff -i 127.0.0.1, -c local --skip-tags no_ci ${{ matrix.playbook }}.yml