Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
chore: adopt prettier (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Mar 29, 2022
1 parent a101747 commit cc940ad
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 85 deletions.
62 changes: 31 additions & 31 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
# Format and labels used aim to match those used by Ansible project
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
categories:
- title: 'Major Changes'
- title: "Major Changes"
labels:
- 'major' # c6476b
- title: 'Minor Changes'
- "major" # c6476b
- title: "Minor Changes"
labels:
- 'feature' # 006b75
- 'enhancement' # ededed
- 'refactoring'
- title: 'Bugfixes'
- "feature" # 006b75
- "enhancement" # ededed
- "refactoring"
- title: "Bugfixes"
labels:
- 'bug' # fbca04
- title: 'Deprecations'
- "bug" # fbca04
- title: "Deprecations"
labels:
- 'deprecated' # fef2c0
- "deprecated" # fef2c0
exclude-labels:
- 'skip-changelog'
- "skip-changelog"
version-resolver:
major:
labels:
- 'major'
- "major"
minor:
labels:
- 'minor'
- 'feature'
- 'enhancement'
- 'refactoring'
- "minor"
- "feature"
- "enhancement"
- "refactoring"
patch:
labels:
- 'patch'
- 'bug'
- 'deprecated'
- "patch"
- "bug"
- "deprecated"
default: patch
autolabeler:
- label: 'skip-changelog'
title: '/chore/i'
- label: 'bug'
title: '/fix/i'
- label: 'enhancement'
title: '/(enhance|improve)/i'
- label: 'feature'
title: '/feature/i'
- label: 'dreprecated'
title: '/deprecat/i'
- label: "skip-changelog"
title: "/chore/i"
- label: "bug"
title: "/fix/i"
- label: "enhancement"
title: "/(enhance|improve)/i"
- label: "feature"
title: "/feature/i"
- label: "dreprecated"
title: "/deprecat/i"
template: |
$CHANGES
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: Verify PR label action
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
valid-labels: 'bug, enhancement, feature, refactoring, major, deprecated, skip-changelog'
invalid-labels: 'help wanted, invalid, feedback-needed, incomplete'
pull-request-number: '${{ github.event.pull_request.number }}'
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "bug, enhancement, feature, refactoring, major, deprecated, skip-changelog"
invalid-labels: "help wanted, invalid, feedback-needed, incomplete"
pull-request-number: "${{ github.event.pull_request.number }}"
disable-reviews: true
4 changes: 2 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
# branches to consider in the event; optional, defaults to all
branches:
- main
- 'releases/**'
- 'stable/**'
- "releases/**"
- "stable/**"

jobs:
update_release_draft:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Check out src from Git
uses: actions/checkout@v2
with:
fetch-depth: 0 # needed by setuptools-scm
fetch-depth: 0 # needed by setuptools-scm
- name: Build dists
run: python -m tox
- name: Publish to test.pypi.org
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: tox

on:
create: # is used for publishing to PyPI and TestPyPI
tags: # any tag regardless of its name, no branches
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
create: # is used for publishing to PyPI and TestPyPI
tags: # any tag regardless of its name, no branches
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- "main"
tags-ignore:
- "**"
pull_request:
schedule:
- cron: 1 0 * * * # Run daily at 0:01 UTC
- cron: 1 0 * * * # Run daily at 0:01 UTC

jobs:
tox_matrix:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
echo "${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}"
${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}
check: # This job does nothing and is only used for the branch protection
check: # This job does nothing and is only used for the branch protection
if: always()

needs:
Expand Down
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
---
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: "v2.5.1"
hooks:
- id: prettier
additional_dependencies:
- prettier
- prettier-plugin-toml
- repo: https://github.com/PyCQA/doc8.git
rev: 0.10.1
hooks:
Expand Down Expand Up @@ -32,13 +40,6 @@ repos:
- id: flake8
additional_dependencies:
- flake8-black
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/codespell-project/codespell.git
rev: v2.1.0
hooks:
Expand Down
16 changes: 0 additions & 16 deletions .yamllint

This file was deleted.

8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ skip-string-normalization = false
[tool.isort]
profile = "black"
known_first_party = "molecule"

[tool.pylint.master]
ignored-modules = [
"molecule",
"pytest",
"yaml",
"_pytest"
]
ignored-modules = ["molecule", "pytest", "yaml", "_pytest"]

[tool.setuptools_scm]
local_scheme = "no-local-version"
4 changes: 1 addition & 3 deletions tests/roles/ensure-ansible/molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: Converge
hosts: all
# avoid gather as setup module fails when python is missing (ubuntu:latest)
Expand All @@ -10,7 +9,6 @@
vars:
test_dir: /root/src
tasks:

- name: ensure-ansible role
include_role:
name: ensure-ansible
Expand All @@ -24,7 +22,7 @@
file:
path: "{{ test_dir }}"
state: directory
mode: '0755'
mode: "0755"

- name: Deploy package wheel(s)
copy:
Expand Down
2 changes: 0 additions & 2 deletions tests/roles/ensure-ansible/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ driver:
name: docker

platforms:


# pip cache cannot be shared due to multiple bugs:
# - python2 cache incompatible with python3 https://github.com/pypa/pip/issues/5250
# - concurrency issues
Expand Down
1 change: 0 additions & 1 deletion tests/roles/ensure-ansible/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: gather_fact fallback block
block:
- name: Attempt to gather facts
Expand Down
2 changes: 1 addition & 1 deletion tests/roles/ensure-ansible/vars/centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pre_packages:
packages:
- bash
- rsync
- gcc # compiling psutil
- gcc # compiling psutil
- python2-devel
- python2-pip
- python2-psutil
2 changes: 1 addition & 1 deletion tests/roles/ensure-ansible/vars/family-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# fedora>=28
packages:
- bash
- gcc # compiling psutil
- gcc # compiling psutil
- python3-devel
- python3-libselinux
- python3-psutil
Expand Down
3 changes: 1 addition & 2 deletions tests/roles/ensure-ansible/vars/redhat-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ pre_packages:
packages:
- bash
- rsync
- gcc # compiling psutil
- gcc # compiling psutil
- python36-devel
- python3-libselinux

# RHEL 8 is missing:
# python3-psutil
1 change: 0 additions & 1 deletion tests/roles/foo/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
hosts: all
gather_facts: false
tasks:

- debug: msg="foo"
1 change: 0 additions & 1 deletion tests/roles/foo/molecule/disabled/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
hosts: all
gather_facts: false
tasks:

- name: Impossible task
fail:
msg: "That playbook should never pass!"

0 comments on commit cc940ad

Please sign in to comment.