-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: separate workflow files *fix: delete Pipenv stuff * doc: add 'name'
- Loading branch information
Showing
7 changed files
with
55 additions
and
1,157 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
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,48 @@ | ||
--- | ||
name: Test an Ansible role | ||
|
||
"on": | ||
workflow_call: | ||
inputs: | ||
ROLE_NAME: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
lint: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
# we need '../' so the actual role can be tested, and '/tmp' is where dependencies will be installed | ||
- name: Create ansible.cfg | ||
run: > | ||
printf '[defaults]\nroles_path=../:/tmp' | ||
> roles/${{ inputs.ROLE_NAME }}/ansible.cfg | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install test dependencies | ||
run: pip install --upgrade ansible ansible-lint yamllint | ||
|
||
- name: Install Galaxy requirements | ||
run: | | ||
cd roles/${{ inputs.ROLE_NAME }} | ||
ansible-galaxy role install -r tests/requirements.yml -p /tmp | ||
ansible-galaxy collection install -r tests/requirements.yml -p /tmp | ||
- name: Run yamllint | ||
run: yamllint . | ||
|
||
- name: Run ansible-lint | ||
run: ansible-lint | ||
|
||
- name: Test syntax | ||
run: | | ||
cd roles/${{ inputs.ROLE_NAME }} | ||
ansible-playbook tests/test.yml -i tests/inventory --syntax-check |
This file was deleted.
Oops, something went wrong.
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,10 +1,8 @@ | ||
antsibull := 'pipenv run antsibull-changelog' | ||
|
||
_default: | ||
@just --list | ||
|
||
# updates version in galaxy.yml and creates changelog | ||
release VERSION: | ||
@sed -i -e 's/^version: .*$/version: {{VERSION}}/' galaxy.yml | ||
@{{antsibull}} release | ||
@antsibull-changelog release | ||
alias r := release |
This file was deleted.
Oops, something went wrong.
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,7 +1,7 @@ | ||
--- | ||
namespace: bellackn | ||
name: homelab | ||
version: 5.0.0 | ||
version: 5.0.1 | ||
readme: README.md | ||
authors: | ||
- Nico Bellack <[email protected]> | ||
|