Skip to content

Commit

Permalink
ci(pre-commit): added pre-commit Github Action & Updated pre-commit c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
Lucino772 committed Dec 21, 2021
1 parent 32e5dc0 commit 8d2e749
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: pre-commit
on: [pull_request, push, workflow_dispatch]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
2 changes: 1 addition & 1 deletion .github/workflows/python-publish-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Upload Python Package - Production

on:
release:
types: [released, edited]
types: [released]

jobs:
deploy:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/python-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

name: Test Python Package

on:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]
on: [pull_request, push, workflow_dispatch]

jobs:
build:
Expand Down
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ repos:
rev: 21.9b0
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
- id: flake8
language_version: python3
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ tag_prefix = v
ignore = E203, E266, E501, W503, F403, F401
max-line-length = 79
select = B,C,E,F,W,T4,B9
exclude =
docs/
versioneer.py
exclude = docs,versioneer.py,_version.py

0 comments on commit 8d2e749

Please sign in to comment.