Skip to content

Commit

Permalink
Merge branch 'release-v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedejaure committed Feb 5, 2023
2 parents 245ea80 + 3a555d6 commit 92e8a0f
Show file tree
Hide file tree
Showing 49 changed files with 3,829 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
exclude_paths:
- .github/
- .roles/
- .collections/
- .cache/
- ~/.cache/ansible-lint/
- ~/.cache/ansible-compat/
warn_list:
- galaxy[version-incorrect]
23 changes: 23 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[bumpversion]
commit = True
tag = False
current_version = 1.0.0

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file(title):CHANGELOG.md]
search = {#}{#} [Unreleased]
replace = {#}{#} [Unreleased]

{#}{#} [{new_version}] - {now:%Y-%m-%d}

[bumpversion:file:galaxy.yml]
search = version: {current_version}
replace = version: {new_version}

[bumpversion:file(links):CHANGELOG.md]
search = [Unreleased]: https://github.com/fedejaure/dev-setup/compare/v{current_version}...HEAD
replace = [Unreleased]: https://github.com/fedejaure/dev-setup/compare/v{new_version}...HEAD
[{new_version}]: https://github.com/fedejaure/dev-setup/compare/v{current_version}...v{new_version}
2 changes: 2 additions & 0 deletions .darglint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[darglint]
strictness = short
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
labels: bug
assignees: ''

---

## Expected Behavior


## Actual Behavior


## Steps to Reproduce the Problem

1.
1.
1.

## Specifications

- Version:
- Platform:
- Subsystem:
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
blank_issues_enabled: false
contact_links: []
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🚀 Feature request
about: Suggest an idea for this project
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Fixes #

## Proposed Changes

-
-
-
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "monthly"
time: "08:00"
timezone: "Europe/Berlin"
labels:
- "dependencies"
- "github_actions"
open-pull-requests-limit: 99
target-branch: "develop"
- package-ecosystem: pip
directory: "/"
schedule:
interval: "monthly"
time: "08:00"
timezone: "Europe/Berlin"
labels:
- "dependencies"
- "python"
open-pull-requests-limit: 99
target-branch: "develop"
44 changes: 44 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "CodeQL"

on:
push:
branches:
- main
- develop
pull_request:
branches:
- develop
schedule:
- cron: '0 6 1 * *'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/[email protected]

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
44 changes: 44 additions & 0 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Pre-commit autoupdate"

on:
schedule:
- cron: '0 6 1 * *'
workflow_dispatch:

jobs:
autoupdate:
name: autoupdate
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: develop

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install pre-commit
run: pip install pre-commit

- name: Run autoupdate
run: pre-commit autoupdate

- name: Run pre-commit
run: pre-commit run --all-files

- uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore-update-pre-commit-hooks
title: Update pre-commit hooks
commit-message: "Update pre-commit hooks"
body: |
# Update pre-commit hooks
- Update pre-commit hooks to the latest version.
delete-branch: true
labels: |
dependencies
python
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: release

on:
push:
tags:
- 'v*'

jobs:
github_release:
name: Create Github Release
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Get version from tag
id: tag_name
shell: bash
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/[email protected]
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
66 changes: 66 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: tests

on:
push:
branches:
- main
- develop
pull_request:
branches:
- develop

jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Linting
run: |
pip install pre-commit
pre-commit run --all-files
tests:
needs: linting
name: molecule-${{ matrix.distro }}
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- debian11
fail-fast: true
steps:
- uses: actions/[email protected]

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install system deps
shell: bash
run: |
pip install poetry
poetry config virtualenvs.in-project true
poetry install --no-root
- name: Install playbooks requirements
shell: bash
run: poetry run inv galaxy-install

- name: Run safety check
shell: bash
run: poetry run inv safety

- name: Run Molecule tests
run: poetry run inv tests
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,14 @@ venv.bak/
.dmypy.json
dmypy.json

# pytype
.pytype/

# Pyre type checker
.pyre/

# Ansible
inventory
.roles/**
.collections/**
/macos.config.yml
52 changes: 52 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: check-merge-conflict
- id: check-json
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: local
hooks:
- id: flakeheaven
name: flakeheaven
description: "`FlakeHeaven` it's a Flake8 wrapper to make it cools."
entry: flakeheaven
args: [lint]
language: python
types: [python]
require_serial: true
additional_dependencies: [
'flake8~=4.0.1',
'flakeheaven~=3.2.1',
'flake8-builtins~=2.1.0',
'flake8-blind-except~=0.2.1',
'flake8-logging-format~=0.9.0',
'flake8-bugbear~=23.1.20',
'flake8-annotations~=2.9.1',
'flake8-docstrings~=1.7.0',
'flake8-bandit~=3.0.0',
'darglint~=1.8.0',
'pylint~=2.16.1',
]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
- repo: https://github.com/ansible-community/ansible-lint.git
rev: v6.12.1
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
Loading

0 comments on commit 92e8a0f

Please sign in to comment.