-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ebc025
commit 9bcee8a
Showing
3 changed files
with
62 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- "!main" | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install pre-commit | ||
run: | | ||
sudo apt update && sudo apt -y install git | ||
pip install pre-commit | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files | ||
|
||
ansible-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Ansible | ||
run: pip install 'ansible>=3.0.0' | ||
|
||
- name: Run Ansible Playbook | ||
run: ansible-playbook tests/test.yml |
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,9 +1,19 @@ | ||
stages: | ||
- test | ||
|
||
test: | ||
before_script: | ||
- apt update && apt -y install git | ||
|
||
ansible-lint: | ||
stage: test | ||
image: python:slim-bookworm | ||
script: | ||
- python -m pip install pre-commit | ||
- pre-commit run --all-files | ||
|
||
ansible-test: | ||
stage: test | ||
image: python:slim-bookworm | ||
script: | ||
- python -m pip install 'ansible>=9.0.0,<=10.0.0' | ||
- python -m pip install 'ansible>=3.0.0' | ||
- ansible-playbook tests/test.yml |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
name: Cleanup trailing whitespaces | ||
args: [--markdown-linebreak-ext=md] | ||
- repo: https://github.com/ansible-community/ansible-lint | ||
rev: v24.9.2 | ||
hooks: | ||
- id: ansible-lint | ||
name: Check Ansible files | ||
args: ["--exclude", ".git/"] |