-
Notifications
You must be signed in to change notification settings - Fork 286
120 lines (103 loc) · 3.42 KB
/
analysis.yml
File metadata and controls
120 lines (103 loc) · 3.42 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: "Static Analysis"
on:
workflow_dispatch:
push:
branches:
- "master"
pull_request_target:
types: [opened, synchronize]
branches:
- "master"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Go-Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Setup FastCI
uses: jfrog-fastci/fastci@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main
- name: Run Go vet
run: go vet -v ./...
Static-Check:
name: Static Check
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Setup FastCI
uses: jfrog-fastci/fastci@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main
- name: Run golangci linter
uses: jfrog/.github/actions/golangci-lint@main
Go-Sec:
name: Go-Sec
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Setup FastCI
uses: jfrog-fastci/fastci@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main
- name: Run Go-Sec scanner
uses: jfrog/.github/actions/gosec-scanner@main
ShellCheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Setup FastCI
uses: jfrog-fastci/fastci@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore_paths: "*test*"
No-Replace:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Setup FastCI
uses: jfrog-fastci/fastci@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}
- name: Check for uncommented replace instructions on JFrog dependencies
run: |
if grep -E '^[[:space:]]*replace[[:space:]]+github\.com/jfrog' go.mod; then
echo "❌ Found uncommented replace directives for JFrog dependencies in go.mod"
echo "All replace directives for JFrog dependencies should be commented out"
exit 1
else
echo "✅ No uncommented replace directives for JFrog dependencies found in go.mod"
fi