Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update template #26

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
# Changes here will be overwritten by Copier
_commit: v2.2.0
_commit: v2.6.0
_src_path: gh:remerge/template
project_id: ansible-role-nomad
project_license: apache-2.0
project_name: Ansible Role for Nomad
project_owner: core
project_type: ansible-role
run_workflows_for_all_branches: false
use_python: true
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
strict_env

# Loads a ".env" file into the current environment
dotenv_if_exists
dotenv_if_exists "${PWD}"/../.env
dotenv_if_exists "${PWD}"/.env

# Add local scripts to PATH
PATH_add "${PWD}/bin"
Expand All @@ -30,6 +31,7 @@ fi

# Load poetry virtual env
if [[ ! -d "${PWD}/.venv" ]]; then
# link the poetry virtualenv to .venv for other tools to use
ln -nfs "$(poetry run poetry env info -p)" "${PWD}/.venv"
fi

Expand Down
8 changes: 8 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
self-hosted-runner:
labels:
- generic
- self-hosted
- nomad
- docker
- default
19 changes: 16 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ on:
push:
branches: [main, master]

permissions: read-all
permissions:
actions: none
checks: none
contents: read
deployments: none
discussions: none
id-token: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none

jobs:
pre-commit:
Expand All @@ -19,9 +32,9 @@ jobs:
uses: snok/install-poetry@v1

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
cache: "poetry"

- name: Load envrc
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,6 @@ id_*
# only.
!*.tfvars
!*.tfvars.json

# Ignore direnv files
.direnv/
Expand Down
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:

# https://github.com/pre-commit/mirrors-prettier/tags
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v3.1.0"
hooks:
- id: prettier
exclude: "^project/"
Expand All @@ -47,7 +47,7 @@ repos:

# https://github.com/adrienverge/yamllint/tags
- repo: https://github.com/adrienverge/yamllint
rev: "v1.32.0"
rev: "v1.33.0"
hooks:
- id: yamllint
entry: yamllint --strict
Expand All @@ -74,7 +74,7 @@ repos:

# https://github.com/ansible/ansible-lint/tags
- repo: https://github.com/ansible/ansible-lint
rev: "v6.21.1"
rev: "v6.22.1"
hooks:
- id: ansible-lint
name: ansible-lint
Expand All @@ -96,7 +96,7 @@ repos:

# https://github.com/bridgecrewio/checkov/tags
- repo: https://github.com/bridgecrewio/checkov
rev: "3.0.21"
rev: "3.1.24"
hooks:
- id: checkov
name: checkov
Expand All @@ -113,3 +113,4 @@ repos:
rev: "v0.19.0"
hooks:
- id: woke-from-source
args: [--config=.woke.yaml]
1 change: 1 addition & 0 deletions .woke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
491 changes: 253 additions & 238 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ description = "Ansible Role for Nomad"
authors = ["Remerge GmbH <core@remerge.io>"]

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.10, < 3.12"

[tool.poetry.group.dev.dependencies]
black = "^23.10.1"
black = "^23.11.0"
flake8 = "^6.1.0"
flake8-bugbear = "^23.9.16"
flake8-bugbear = "^23.12.2"
pylint = "^3.0.2"
tox = "^4.11.3"
tox = "^4.11.4"
molecule = { extras = ["docker"], version = "^6.0.2" }
ansible-lint = { version = "^6.21.1", markers = "platform_system != 'Windows'" }
ansible-lint = { version = "^6.22.1", markers = "platform_system != 'Windows'" }

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
3 changes: 2 additions & 1 deletion python.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ update:: python-update

.PHONY: python-clean
python-clean: ## remove current Python virtualenv
poetry env remove python
poetry env remove python || :
rm -rf .venv
clean:: python-clean