Skip to content

Commit

Permalink
Merge pull request #41 from mrlesmithjr/mrlesmithjr/issue40_Add-Poetr…
Browse files Browse the repository at this point in the history
…y-project

Add Poetry project
  • Loading branch information
mrlesmithjr authored Sep 24, 2021
2 parents 5addf44 + e2f0760 commit 77004ff
Show file tree
Hide file tree
Showing 24 changed files with 2,125 additions and 152 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skip_list: []
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
exclude = venv/
exclude = .venv/
max-line-length = 88
14 changes: 14 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Configuration for request-info - https://github.com/behaviorbot/request-info

# *Required* Comment to reply with
requestInfoReplyComment: >
We would appreciate it if you could provide us with more info about this issue/pr!
# *OPTIONAL* default titles to check against for lack of descriptiveness
# MUST BE ALL LOWERCASE
requestInfoDefaultTitles:
- update readme.md
- updates

# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
requestInfoLabelToAdd: needs-more-info
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label: "chore"
- title: "🧺 Miscellaneous" #Everything except ABAP
label: "misc"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
13 changes: 13 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
# See https://developer.github.com/v3/repos/#edit for all available settings.

# The name of the repository. Changing this will rename the repository
name: ansible-dnsmasq

# A short description of the repository that will show up on GitHub
description: Enter description of Ansible role

# A comma-separated list of topics to set on the repository
topics: ansible, ansible-role
28 changes: 20 additions & 8 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,37 @@ jobs:
molecule_distro:
- centos7
- centos8
# - debian8
- debian9
- debian10
- fedora
- ubuntu1604
- ubuntu1804
- ubuntu2004
python-version: [3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python 3
uses: actions/setup-python@v1
- uses: actions/checkout@v2
with:
python-version: "3.x"
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip pip-tools
pip-sync requirements.txt requirements-dev.txt
ansible --version
molecule --version
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
pip install pre-commit
- name: Run pre-commit checks
run: |
SKIP=no-commit-to-branch pre-commit run --all-files
- name: Test with molecule
run: |
molecule test --scenario-name ${{ matrix.molecule_distro }}
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/release-galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Ansible Galaxy
on:
push:
branches:
- main
- master
- 'releases/**'
tags:
- '*'
pull_request:
branches:
- main
- master
- 'releases/**'

jobs:
galaxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
pip install pre-commit
- name: Trigger a new import on Galaxy.
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

poetry.lock
10 changes: 6 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ before_script:
musl-dev libffi-dev openssl-dev openssh
- docker info
- python3 --version
- python3 -m venv venv
- source venv/bin/activate
- pip3 install --upgrade pip pip-tools
- pip-sync requirements.txt requirements-dev.txt
- ansible --version
Expand All @@ -29,10 +31,10 @@ centos8:
script:
- molecule test --scenario-name centos8

debian8:
stage: molecule-test
script:
- molecule test --scenario-name debian8
# debian8:
# stage: molecule-test
# script:
# - molecule test --scenario-name debian8

debian9:
stage: molecule-test
Expand Down
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, develop, --branch, master, --branch, main]
- id: trailing-whitespace
- repo: https://github.com/ansible-community/ansible-lint
rev: v5.0.7
hooks:
- id: ansible-lint
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.9.1
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.1
hooks:
- id: yamllint
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ before_install:
env:
- molecule_distro=centos7
- molecule_distro=centos8
- molecule_distro=debian8
# - molecule_distro=debian8
- molecule_distro=debian9
- molecule_distro=debian10
- molecule_distro=fedora
- molecule_distro=ubuntu1604
- molecule_distro=ubuntu1804
- molecule_distro=ubuntu2004
install:
- pip3 install --upgrade pip pip-tools
- pip-sync requirements.txt requirements-dev.txt
- ansible --version
- molecule --version
- python -m pip install --upgrade pip
- pip install -r requirements.txt -r requirements-dev.txt
- pip install pre-commit
script:
- molecule test --scenario-name "$molecule_distro"
notifications:
Expand Down
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extends: default

ignore: |
venv/
.venv/

rules:
braces:
Expand Down
Loading

0 comments on commit 77004ff

Please sign in to comment.