File tree Expand file tree Collapse file tree 2 files changed +132
-0
lines changed
Expand file tree Collapse file tree 2 files changed +132
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Pull Request Verification
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ # --- backend: Go Checks ---
11+ backend-checks :
12+ name : Backend (Go)
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Go
19+ uses : actions/setup-go@v5
20+ with :
21+ go-version : ' 1.24'
22+ cache : true
23+
24+ - name : Go Format Check
25+ run : |
26+ if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
27+ echo "The following files are not formatted:"
28+ gofmt -l .
29+ exit 1
30+ fi
31+
32+ - name : Run golangci-lint
33+ uses : golangci/golangci-lint-action@v6
34+ with :
35+ version : latest
36+ args : --timeout=5m
37+
38+ - name : Security Scan (gosec)
39+ uses : securego/gosec@master
40+ with :
41+ args : ./...
42+
43+ - name : Run Tests
44+ run : go test -v -short ./...
45+
46+ # --- frontend: Web Checks ---
47+ frontend-checks :
48+ name : Frontend (Svelte)
49+ runs-on : ubuntu-latest
50+ steps :
51+ - name : Checkout code
52+ uses : actions/checkout@v4
53+
54+ - name : Setup Node.js
55+ uses : actions/setup-node@v4
56+ with :
57+ node-version : ' 20'
58+ cache : ' npm'
59+ cache-dependency-path : frontend/package-lock.json
60+
61+ - name : Install Dependencies
62+ run : |
63+ cd frontend
64+ npm ci
65+
66+ - name : Build Check
67+ run : |
68+ cd frontend
69+ npm run build
70+
71+ # --- security: Secrets Scan ---
72+ secrets-scan :
73+ name : Secrets Scan
74+ runs-on : ubuntu-latest
75+ steps :
76+ - name : Checkout code
77+ uses : actions/checkout@v4
78+ with :
79+ fetch-depth : 0
80+ - name : Secret Scanning
81+ uses : trufflesecurity/trufflehog@main
82+ with :
83+ extra_args : --only-verified
Original file line number Diff line number Diff line change 1+ linters-settings :
2+ govet :
3+ check-shadowing : true
4+ golint :
5+ min-confidence : 0.8
6+ gocyclo :
7+ min-complexity : 15
8+ maligned :
9+ suggest-new : true
10+ dupl :
11+ threshold : 100
12+ goconst :
13+ min-len : 3
14+ min-occurrences : 3
15+ misspell :
16+ locale : US
17+ lll :
18+ line-length : 140
19+ goimports :
20+ local-prefixes : github.com/kiktor12358/TeleGhost
21+
22+ linters :
23+ enable :
24+ - govet
25+ - errcheck
26+ - staticcheck
27+ - unused
28+ - gosimple
29+ - structcheck
30+ - varcheck
31+ - ineffassign
32+ - deadcode
33+ - typecheck
34+ - gocyclo
35+ - goconst
36+ - misspell
37+ - lll
38+ - unparam
39+ - nakedret
40+ - prealloc
41+ - whitespace
42+
43+ run :
44+ timeout : 5m
45+ tests : true
46+ skip-dirs :
47+ - vendor
48+ - android
49+ - frontend/node_modules
You can’t perform that action at this time.
0 commit comments