-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (103 loc) · 2.63 KB
/
push.yml
File metadata and controls
106 lines (103 loc) · 2.63 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Push
on:
push:
branches:
- master
pull_request:
env:
GO_CACHE_PREFIX: ubuntu-20.04-go
jobs:
test-go-stable:
name: Test
runs-on: ubuntu-20.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 }}-test-${{ hashFiles('go.mod') }}
restore-keys: |
${{ env.GO_CACHE_PREFIX }}-test-
${{ env.GO_CACHE_PREFIX }}-
- uses: actions/setup-go@v2
with:
go-version: '1.20.x'
- name: script
run: |
set -x
go test ./...
semgrep:
name: Semgrep
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Semgrep
id: semgrep
uses: returntocorp/semgrep-action@v1
with:
config: p/ci
no-confusion:
name: No confusion
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: vmarkovtsev/no-confusion-action@1.0.6
with:
include: '["**/*.yml", "**/*.yaml", "**/*.json", "**/*.go"]'
go-vet:
name: Go vet
runs-on: ubuntu-20.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 }}-
- uses: actions/setup-go@v2
with:
go-version: '1.20.x'
- name: vet
run: go vet ./...
static-check:
name: Static check
runs-on: ubuntu-20.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 }}-
- uses: actions/setup-go@v2
with:
go-version: '1.20.x'
- name: install staticcheck
run: |
wget https://github.com/dominikh/go-tools/releases/download/2023.1.3/staticcheck_linux_amd64.tar.gz
tar -xf staticcheck_linux_amd64.tar.gz
- name: staticcheck
run: staticcheck/staticcheck
gitleaks:
name: Gitleaks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: gitleaks-action
uses: zricethezav/gitleaks-action@v1.6.0