-
Notifications
You must be signed in to change notification settings - Fork 12
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 #58 from modeseven-os-climate/update-devops-tooling
Chore: Pull DevOps tooling from upstream repository
- Loading branch information
Showing
2 changed files
with
290 additions
and
50 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
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,42 +1,162 @@ | ||
--- | ||
ci: | ||
autofix_commit_msg: "Chore: pre-commit autoupdate" | ||
skip: | ||
# pre-commit.ci cannot install WGET, so tomlint must be disabled | ||
- tomllint | ||
# - pre-commit-update | ||
|
||
exclude: | | ||
(?x)^( | ||
docs\/conf.py| | ||
dco-signoffs/$ | ||
)$ | ||
repos: | ||
|
||
# - repo: https://gitlab.com/vojko.pribudic/pre-commit-update | ||
# rev: v0.1.0 | ||
# hooks: | ||
# - id: pre-commit-update | ||
# args: [--dry-run] | ||
|
||
- repo: local | ||
hooks: | ||
- id: tomllint | ||
name: "Script: scripts/tomllint.sh" | ||
language: script | ||
# pass_filenames: false | ||
files: \^*.toml | ||
types: [file] | ||
entry: scripts/tomllint.sh . | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: name-tests-test | ||
- id: check-byte-order-marker | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-symlinks | ||
- id: check-toml | ||
# - id: detect-aws-credentials | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: check-symlinks | ||
- id: detect-private-key | ||
- id: check-ast | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- id: name-tests-test | ||
args: ["--pytest-test-first"] | ||
# Do not allow direct push to main/master branches | ||
- id: no-commit-to-branch | ||
# - id: pretty-format-json | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
# Autoformat: YAML, JSON, Markdown, etc. | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v4.0.0-alpha.8 | ||
hooks: | ||
- id: prettier | ||
args: | ||
['--no-error-on-unmatched-pattern', '--ignore-unknown'] | ||
|
||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.5.5 | ||
# Lint: Markdown | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.39.0 | ||
hooks: | ||
- id: remove-tabs | ||
- id: markdownlint | ||
args: ["--fix"] | ||
|
||
# - repo: https://github.com/asottile/pyupgrade | ||
# rev: v3.15.0 | ||
# hooks: | ||
# - id: pyupgrade | ||
# args: ['--py37-plus'] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: '24.2.0' | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.3.0 | ||
hooks: | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/s-weigand/flake8-nb | ||
rev: v0.5.3 | ||
- repo: https://github.com/jorisroovers/gitlint | ||
rev: v0.19.1 | ||
hooks: | ||
- id: flake8-nb | ||
additional_dependencies: | ||
- pep8-naming | ||
# Ignore all format-related checks as Black takes care of those. | ||
args: | ||
- --ignore=E2, W5, F401, E401, E704 | ||
- --select=E, W, F, N | ||
- --max-line-length=120 | ||
- id: gitlint | ||
|
||
- repo: https://github.com/openstack/bashate | ||
rev: 2.1.1 | ||
hooks: | ||
- id: bashate | ||
args: ["--ignore=E006,E011"] | ||
|
||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.10.0.1 | ||
hooks: | ||
- id: shellcheck | ||
# Optionally only show errors and warnings | ||
# args: ["--severity=warning"] | ||
|
||
# If you want to avoid flake8 errors due to unused vars or imports: | ||
# - repo: https://github.com/PyCQA/autoflake | ||
# rev: v2.0.0 | ||
# hooks: | ||
# - id: autoflake | ||
# args: [ | ||
# --in-place, | ||
# --remove-all-unused-imports, | ||
# --remove-unused-variables, | ||
# ] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
|
||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint | ||
args: [--strict] | ||
|
||
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py | ||
rev: v1.6.27.13 | ||
hooks: | ||
- id: actionlint | ||
|
||
# If like to embrace black styles even in the docs: | ||
# - repo: https://github.com/asottile/blacken-docs | ||
# rev: v1.13.0 | ||
# hooks: | ||
# - id: blacken-docs | ||
# additional_dependencies: [black] | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: "7.0.0" | ||
hooks: | ||
- id: flake8 | ||
|
||
# Check for misspells in documentation files: | ||
# - repo: https://github.com/codespell-project/codespell | ||
# rev: v2.2.2 | ||
# hooks: | ||
# - id: codespell | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v1.9.0" | ||
hooks: | ||
- id: mypy | ||
verbose: true | ||
args: [--show-error-codes] | ||
additional_dependencies: ["pytest", "types-requests"] |