Skip to content

Commit

Permalink
ci: use make for linting
Browse files Browse the repository at this point in the history
Signed-off-by: Zakhar Bessarab <[email protected]>
  • Loading branch information
zekker6 committed Feb 22, 2024
1 parent fd21c35 commit d69a7b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,21 @@
name: 'Lint'
on:
pull_request: {}
push: {}
pull_request: { }
push: { }

jobs:
lint:
name: 'Lint'
runs-on: ubuntu-latest
container:
image: python:3.9-alpine
image: python:3.11-alpine
steps:
- name: 'Checkout'
uses: actions/checkout@v3

- name: Setup ansible
- name: Lint
run: |
apk add --update --no-cache --virtual build_dependencies gcc musl-dev libffi-dev openssl-dev rust cargo
pip install --no-cache-dir ansible-core
apk add --update --no-cache --virtual build_dependencies gcc musl-dev libffi-dev openssl-dev rust cargo make
make init-venv
ansible-galaxy collection install community.general
- name: 'Yamllint'
uses: karancode/yamllint-github-action@master
with:
yamllint_file_or_dir: 'roles'
yamllint_strict: false
yamllint_comment: false

- name: Checkout
uses: actions/checkout@v3

- name: "Ansible lint playbooks"
uses: ansible/[email protected]
with:
path: "playbooks/*"

- name: "Ansible lint roles"
uses: ansible/[email protected]
with:
path: "roles/*"
make lint
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
init-venv:
python3 -m venv .venv
. .venv/bin/activate && pip install -r requirements.txt
. .venv/bin/activate
pip install -r requirements.txt
ansible-galaxy collection install community.general

venv:
. .venv/bin/activate
Expand Down

0 comments on commit d69a7b2

Please sign in to comment.