-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.6 KB
/
ci.yml
File metadata and controls
63 lines (51 loc) · 1.6 KB
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
---
name: CI
defaults:
run:
shell: bash
on:
pull_request:
branches: [master]
jobs:
ansible-syntax:
strategy:
matrix:
include:
- ansible_version: "2.18"
python_version: "3.12"
runs-on: ubuntu-latest
name: Ansible Syntax Check
steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
path: "ansible_collections/paloaltonetworks/panos_policy_automation"
- name: Set up Python
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4
with:
python-version: ${{ matrix.python_version }}
- name: Install Ansible
run: |
python -m pip install --upgrade pip
pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
pip install ansible-lint
- name: Install PAN-OS collection
run: |
ansible-galaxy collection install paloaltonetworks.panos
- name: Ansible lint
run: |
cd ansible_collections/paloaltonetworks/panos_policy_automation
ls -l
ansible-lint . --offline
- name: Ansible Sanity Tests
run: |
cd ansible_collections/paloaltonetworks/panos_policy_automation
ansible-test sanity --exclude mkdocs.yml
secrets-scan:
runs-on: ubuntu-latest
name: Secrets Scanning
steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
fetch-depth: 0