-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (76 loc) · 1.94 KB
/
push.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Push
on:
push:
branches:
- master
pull_request:
jobs:
semgrep:
name: Semgrep
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Semgrep
id: semgrep
uses: returntocorp/semgrep-action@v1
with:
config: p/ci
go-vet:
name: Go vet
runs-on: ubuntu-22.04
steps:
- name: actions/checkout
uses: actions/checkout@v2
- name: actions/cache
uses: actions/cache@v2
with:
path: |
~/go
~/.cache/go-build
key: ${{ env.GO_CACHE_PREFIX }}-go-vet-${{ hashFiles('go.mod') }}
restore-keys: |
${{ env.GO_CACHE_PREFIX }}-go-vet-
${{ env.GO_CACHE_PREFIX }}-
- name: vet
run: go vet ./...
static-check:
name: Static check
runs-on: ubuntu-22.04
steps:
- name: actions/checkout
uses: actions/checkout@v2
- name: actions/cache
uses: actions/cache@v2
with:
path: |
~/go
~/.cache/go-build
key: ${{ env.GO_CACHE_PREFIX }}-static-check-${{ hashFiles('go.mod') }}
restore-keys: |
${{ env.GO_CACHE_PREFIX }}-static-check-
${{ env.GO_CACHE_PREFIX }}-
- name: install staticcheck
run: |
wget https://github.com/dominikh/go-tools/releases/download/v0.3.3/staticcheck_linux_amd64.tar.gz
tar -xf staticcheck_linux_amd64.tar.gz
- name: gofmt
run: test -z "$(gofmt -s -l . | grep -v vendor/)"
- name: staticcheck
run: staticcheck/staticcheck
gitleaks:
name: Gitleaks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: gitleaks-action
uses: gitleaks/[email protected]
meta-linters:
name: Static checks
runs-on: ubuntu-22.04
needs:
- semgrep
- go-vet
- static-check
- gitleaks
steps:
- run: echo "ok"