Skip to content

Commit

Permalink
Add ansible-lint sanity test to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jborean93 committed Feb 5, 2024
1 parent 1a9e3ae commit e4a7d8e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ stages:
test: sanity
- name: Units
test: units
- name: Lint
test: lint
- stage: Ansible_2_16
displayName: Ansible 2.16
dependsOn: []
Expand Down
13 changes: 13 additions & 0 deletions tests/utils/shippable/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -o pipefail -eux

# This is aligned with the galaxy-importer used by AH
# https://github.com/ansible/galaxy-importer/blob/d4b5e6d12088ba452f129f4824bd049be5543358/setup.cfg#L22C4-L22C33
python -m pip install \
'ansible-lint>=6.2.2,<=6.14.3'

ansible-lint \
--profile production \
--exclude tests/integration/ \
--exclude tests/unit/

0 comments on commit e4a7d8e

Please sign in to comment.