Skip to content

Commit 8576553

Browse files
committed
CI: Add ansible-lint
1 parent 156a803 commit 8576553

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pull-request.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Pull request
3+
'on':
4+
pull_request:
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-22.04
8+
permissions: {}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
# NOTE(upgrade): Keep these in sync with Kayobe's supported Ansible and Python versions (see release notes).
14+
- ansible: "2.16"
15+
python: "3.12"
16+
name: Ansible ${{ matrix.ansible }} lint with Python ${{ matrix.python }}
17+
steps:
18+
- name: GitHub Checkout 🛎
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Python ${{ matrix.python-version }} 🐍
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python }}
25+
26+
- name: Install dependencies 📦
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install ansible-core==${{ matrix.ansible }}.* ansible-lint
30+
31+
- name: Linting code 🧪
32+
run: |
33+
ansible-lint -v --force-color

0 commit comments

Comments
 (0)