Skip to content

Commit

Permalink
feat: pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealSeber committed Nov 27, 2023
1 parent 7f86646 commit d6d6f79
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: pre-commit

on: push

jobs:
run-linters:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Set up pre-commit Cache
uses: pre-commit/[email protected]
41 changes: 41 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
exclude: ^.*\/.*copy.*$
# Explanation: ^.*\/copy\.py$ matches any file containing "copy" word in any directory.
- id: check-yaml
exclude: ^.*\/.*copy.*$
- id: check-added-large-files
exclude: ^.*\/.*copy.*$
- id: end-of-file-fixer
exclude: ^.*\/.*copy.*$
- id: trailing-whitespace
exclude: ^.*\/.*copy.*$

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.1
hooks:
- id: yamlfmt
exclude: ^.*\/.*copy.*$

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: "reorder-python-imports"
exclude: ^.*\/.*copy.*$

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [--max-line-length=88]
exclude: ^.*\/.*copy.*$

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
language_version: python3.11
exclude: ^.*\/.*copy\.py$

0 comments on commit d6d6f79

Please sign in to comment.