Skip to content

Commit

Permalink
chore: add pre-commit action
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Zapletal <[email protected]>
  • Loading branch information
lzap authored and ezr-ondrej committed Nov 7, 2023
1 parent 18a746d commit 58573a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
commit:
name: "💾 Commit message"
name: "💬 Commit message"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -30,8 +30,16 @@ jobs:
make check-commits
working-directory: code
precommit:
name: "📚 Commit checks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]

build:
name: "🛠 Go Build"
name: "🛠 Go Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -44,7 +52,7 @@ jobs:
make check-system-go build GO=go
lint:
name: "🎯 Code format & OpenAPI lint"
name: "🏢 Code format & OpenAPI lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -67,7 +75,7 @@ jobs:
make check-system-go check-fmt validate GO=go
golint:
name: "🎯 Go linter"
name: "🏫 Go linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -82,7 +90,7 @@ jobs:
version: v1.53.3

testing:
name: "📎 Unit tests"
name: "🏅 Unit tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -96,7 +104,7 @@ jobs:
make check-system-go test GO=go
test-dao:
name: "🗄 Integration tests"
name: "🏆 Integration tests"
runs-on: ubuntu-latest
services:
postgres:
Expand Down
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json

0 comments on commit 58573a9

Please sign in to comment.