-
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
c0113b3
commit 633936c
Showing
10 changed files
with
251 additions
and
27 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,28 @@ | ||
--- | ||
name: Build | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase. | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Update ubuntu repositories | ||
run: sudo apt-get update | ||
|
||
- name: Install make | ||
run: sudo apt-get install -y make | ||
|
||
- name: Build collection | ||
run: make build |
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,29 @@ | ||
--- | ||
name: lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Update ubuntu repositories | ||
run: sudo apt-get update | ||
|
||
- name: Install make | ||
run: sudo apt-get install -y make | ||
|
||
- name: Lint code | ||
run: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
name: molecule | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 5 * * 5" | ||
|
||
jobs: | ||
molecule: | ||
name: molecule | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
scenario: | ||
- name: install | ||
- name: offline | ||
- name: online | ||
- name: stop | ||
- name: start | ||
- name: restart | ||
image: | ||
- name: ubuntu2204 | ||
command: /lib/systemd/systemd | ||
- name: ubuntu2004 | ||
command: /lib/systemd/systemd | ||
- name: debian11 | ||
command: /lib/systemd/systemd | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Update ubuntu repositories | ||
run: sudo apt-get update | ||
|
||
- name: Install make | ||
run: sudo apt-get install -y make | ||
|
||
- name: Install dependencies | ||
run: make install | ||
|
||
- name: Debug test environment | ||
run: make debug | ||
|
||
- name: Install role requirements | ||
run: make requirements | ||
|
||
- name: Run molecule tests. | ||
run: make test | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
MOLECULE_DOCKER_IMAGE: ${{ matrix.image.name }} | ||
MOLECULE_DOCKER_COMMAND: ${{ matrix.image.command }} | ||
MOLECULE_SCENARIO: ${{ matrix.scenario.name }} |
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,30 @@ | ||
--- | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase. | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Update ubuntu repositories | ||
run: sudo apt-get update | ||
|
||
- name: Install make | ||
run: sudo apt-get install -y make | ||
|
||
- name: Release collection | ||
run: make publish | ||
env: | ||
GALAXY_API_KEY: "${{ secrets.GALAXY_API_KEY }}" |
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,28 @@ | ||
--- | ||
name: version | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check if galaxy.yml has been modified | ||
run: | | ||
# Get a list of all modified files in this PR | ||
FILES_CHANGED=$(git diff --name-only HEAD^ HEAD) | ||
echo "Files changed: $FILES_CHANGED" | ||
# Check if galaxy.yml is in the list of changed files | ||
if [[ $FILES_CHANGED != *"galaxy.yml"* ]]; then | ||
echo "Error: galaxy.yml has not been modified." | ||
exit 1 | ||
fi |
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,11 @@ | ||
fileignoreconfig: | ||
- filename: README.md | ||
ignore_detectors: [filecontent] | ||
- filename: poetry.lock | ||
ignore_detectors: [filecontent] | ||
- filename: tests/test_filter.py | ||
ignore_detectors: [filecontent] | ||
- filename: plugins/filter/custom_filter.py | ||
ignore_detectors: [filecontent] | ||
- filename: .github/workflows/release.yml | ||
ignore_detectors: [filecontent] |
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
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,3 @@ | ||
--- | ||
platforms: | ||
- name: instance |
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,15 @@ | ||
--- | ||
- name: Verify | ||
hosts: localhost | ||
connection: local | ||
gather_facts: false | ||
tasks: | ||
- name: Test | ||
ansible.builtin.fail: | ||
vars: | ||
prefixes: ['a', 'b'] | ||
suffix: 'suffix' | ||
expected: 'a:suffix,b:suffix' | ||
filter: 'nephelaiio.plugins.map_format' | ||
result: "{{ prefixes | map(filter, '%s:' + suffix) | join(',') }}" | ||
when: result != expected |