-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Zakhar Bessarab <[email protected]>
- Loading branch information
Showing
2 changed files
with
18 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,29 @@ | ||
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 | ||
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 | ||
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] | ||
- name: Cache .venv directory | ||
uses: actions/cache@v3 | ||
with: | ||
path: "playbooks/*" | ||
path: .venv | ||
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-venv- | ||
- name: "Ansible lint roles" | ||
uses: ansible/[email protected] | ||
with: | ||
path: "roles/*" | ||
- name: Lint | ||
run: | | ||
apk add --update --no-cache --virtual build_dependencies gcc musl-dev libffi-dev openssl-dev rust cargo make | ||
make init-venv | ||
make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters