-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlefthook.yml
More file actions
45 lines (42 loc) · 1.35 KB
/
Copy pathlefthook.yml
File metadata and controls
45 lines (42 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
pre-commit:
parallel: true
jobs:
- name: golangci-lint config verify
run: bin/golangci-lint config verify
- group:
# Go linters and formatters
jobs:
- name: Run gofumpt
run: bin/gofumpt -l -w .
stage_fixed: true
- name: Run newline-after-block linter
run: bin/newline-after-block -fix ./...
stage_fixed: true
- name: Run golangci-lint
run: bin/golangci-lint run --fix ./...
stage_fixed: true
- name: Lint markdown files
run: markdownlint-cli2 --fix --files '**/*.md' '!.scratch/**' '!.beads/**' '!docs/**'
stage_fixed: true
pre-push:
# Since some jobs might update files (e.g., go mod tidy), we cannot run them in parallel
# parallel: true
jobs:
- name: Check go mod tidy
run: go mod tidy
stage_fixed: true
- name: Check go generate docs
run: cd ./tools && go generate ./... && git diff --exit-code -- '**/*_gen.go' '**/*_gen_test.go'
stage_fixed: true
- name: Run acceptance tests
env:
TF_ACC: "1"
run: go test -v -shuffle on -timeout 900s ./...
commit-msg:
# Dogfood hooks
jobs:
- name: Build all hooks
run: go build -v -o bin/commit-msg-lint github.com/breml/githooks/cmd/commit-msg-lint
- name: Run all hooks
run: bin/commit-msg-lint {1}