Skip to content

Commit

Permalink
Merge pull request #4 from cased/rick/ci-checks
Browse files Browse the repository at this point in the history
Adding pre commit checks and ci checks
  • Loading branch information
SirEntropy authored Aug 16, 2024
2 parents 16cfe44 + 46ebf58 commit 57b6c2e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .ci-pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: "^comet/core/migrations/.*"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
hooks:
- id: ruff
exclude: "^comet/core/migrations/.*"

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
exclude: "^comet/core/migrations/.*"
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 88
extend-ignore = E203, E266, E501, W503
max-complexity = 18
select = B,C,E,F,W,T4,B9
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: useblacksmith/setup-python@v6
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --config .ci-pre-commit-config.yaml
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ __pycache__/
env/
.env/
venv/
.DS_STORE
.DS_STORE
.pre-commit-config.yaml

0 comments on commit 57b6c2e

Please sign in to comment.