Skip to content

Commit 1703d1c

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

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/pull-request.yml

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

0 commit comments

Comments
 (0)