-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from wayofdev/feat-update-tpl
- Loading branch information
Showing
41 changed files
with
1,557 additions
and
593 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 |
---|---|---|
|
@@ -8,3 +8,9 @@ skip_list: | |
- command-instead-of-shell | ||
- risky-shell-pipe | ||
- line-length | ||
|
||
exclude_paths: | ||
- ./contrib | ||
- ./.venv | ||
|
||
... |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
--- | ||
|
||
github: wayofdev | ||
|
||
... |
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 |
---|---|---|
|
@@ -7,3 +7,5 @@ updates: | |
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
... |
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 |
---|---|---|
|
@@ -24,60 +24,89 @@ jobs: | |
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3 | ||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install Poetry | ||
- name: Install poetry into system | ||
uses: gi0baro/setup-poetry-bin@v1 | ||
with: | ||
virtualenvs-in-project: true | ||
|
||
- name: Load cached .venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/requirements.yml') }} | ||
|
||
- name: Install dependencies | ||
run: set -eux; make install-deps | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: make install-deps | ||
|
||
- name: Run linting tasks | ||
run: set -eux; make lint | ||
run: make lint | ||
|
||
integration-molecule: | ||
name: Integration check on macOS with various molecule scenarios | ||
runs-on: macos-${{ matrix.os }} | ||
integration-macos-molecule: | ||
name: Integration on macOS | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
os: ["12"] | ||
python-version: ["3.9"] | ||
os: ["macos-12"] | ||
scenario: ["defaults-restored-on-localhost"] | ||
|
||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup python3 | ||
uses: actions/setup-python@v4 | ||
- name: Check out the actions/cache source | ||
uses: actions/checkout@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
repository: actions/cache | ||
ref: v3 | ||
path: .tmp/actions/cache | ||
|
||
- name: Install poetry | ||
- name: Check out fix - make actions/cache@v3 run always, not only when job succeeds | ||
run: | | ||
sed -i -e '/ post-if: /d' .tmp/actions/cache/action.yml | ||
- name: Install poetry into system | ||
uses: gi0baro/setup-poetry-bin@v1 | ||
with: | ||
virtualenvs-in-project: true | ||
|
||
- name: Load cached .venv | ||
id: cached-poetry-dependencies | ||
uses: ./.tmp/actions/cache | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/requirements.yml') }} | ||
|
||
- name: Install test dependencies | ||
run: export INSTALL_POETRY=false; make install | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: make install-deps | ||
|
||
- name: Run molecule tests | ||
- name: Test the playbook with molecule | ||
run: poetry run molecule test --scenario-name "${SCENARIO}" -- -v | ||
env: | ||
SCENARIO: ${{ matrix.scenario}} | ||
SCENARIO: ${{ matrix.scenario }} | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish: | ||
if: github.event.inputs.shouldPublish == 'yes' || github.ref == 'refs/heads/master' | ||
needs: | ||
- lint | ||
- integration-molecule | ||
- integration-macos-molecule | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Publish to Ansible Galaxy | ||
uses: robertdebock/[email protected] | ||
with: | ||
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 |
---|---|---|
|
@@ -20,3 +20,5 @@ jobs: | |
release-type: node | ||
package-name: ansible-role-dock | ||
default-branch: master | ||
|
||
... |
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 |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
*/__pycache__ | ||
*.pyc | ||
.cache | ||
poetry.lock |
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 @@ | ||
[submodule "contrib/poetry-bin"] | ||
path = contrib/poetry-bin | ||
url = https://github.com/gi0baro/poetry-bin |
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,21 @@ | ||
--- | ||
|
||
ansible: | ||
|
||
# List of allowed literal bools (ANSIBLE0014) | ||
literal-bools: | ||
- "true" | ||
- "false" | ||
- "yes" | ||
- "no" | ||
|
||
# Global settings for all defined rules | ||
rules: | ||
# List of files to exclude | ||
exclude_files: | ||
- ./contrib | ||
- ./.venv | ||
|
||
version: "1.0" | ||
|
||
... |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ extends: default | |
|
||
ignore: | | ||
contrib | ||
.venv | ||
|
||
# Overwrite above default rules | ||
rules: | ||
|
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
Oops, something went wrong.