-
Notifications
You must be signed in to change notification settings - Fork 1
/
lefthook.go.yml
38 lines (37 loc) · 1.19 KB
/
lefthook.go.yml
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
---
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
#
# This will run the key security checks that will have redacted secrets on output
# ci-lint:
# commands:
# golangci-lint:
# tags: lint go
# name: golangci-lint
# run: golangci-lint run ./... --config .golangci.yml
pre-push:
commands:
test:
tags: docs tests go
run: |
echo "🧪 running a full go test... this may take a few minutes"
GOTESTS='superslow' go test ./... -v -json -coverprofile ./.artifacts/cover.out | tparse -all
go tool cover -html=./.artifacts/cover.out -o ./.artifacts/coverage.html
gopherbadger -md="README.md,coverage.md"
git add README.md && git commit --amend --no-edit README.md
git add coverage.md && git commit --amend --no-edit coverage.md
git add coverage.md && git commit --amend --no-edit coverage_badge.png
pre-commit:
parallel: false
tags: go lint
commands:
format:
tags: go
run: mage go:fmt
lint:
tags: go
run: mage go:lint
test:
tags: go
run: go test ./... -v -json -cover | tparse -all -pulse "1s"