Skip to content

Commit d8a4007

Browse files
committed
fix(ci): triggers and expand the pipeline with higher-signal jobs
1 parent 086a2b4 commit d8a4007

54 files changed

Lines changed: 457 additions & 394 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "gomod"
3+
- package-ecosystem: gomod
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: weekly
77
open-pull-requests-limit: 10
8-
reviewers:
9-
- "malwarebo"
10-
assignees:
11-
- "malwarebo"
12-
commit-message:
13-
prefix: "security"
14-
include: "scope"
15-
labels:
16-
- "security"
17-
- "dependencies"
18-
ignore:
19-
- dependency-name: "*"
20-
update-types: ["version-update:semver-major"]
21-
- package-ecosystem: "docker"
8+
groups:
9+
go-dependencies:
10+
patterns:
11+
- "*"
12+
13+
- package-ecosystem: docker
2214
directory: "/"
2315
schedule:
24-
interval: "weekly"
25-
open-pull-requests-limit: 5
26-
reviewers:
27-
- "malwarebo"
28-
assignees:
29-
- "malwarebo"
30-
commit-message:
31-
prefix: "docker"
32-
include: "scope"
33-
labels:
34-
- "docker"
35-
- "security"
16+
interval: weekly
17+
18+
- package-ecosystem: github-actions
19+
directory: "/"
20+
schedule:
21+
interval: weekly
22+
groups:
23+
github-actions:
24+
patterns:
25+
- "*"

.github/workflows/ci.yml

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ main, develop ]
7+
branches: [ master ]
88

99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
group: ci-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
lint:
1418
runs-on: ubuntu-latest
@@ -22,28 +26,61 @@ jobs:
2226
with:
2327
go-version: '1.26.4'
2428

25-
- name: Setup CI environment
26-
run: ./scripts/ci-setup.sh
27-
2829
- name: Run golangci-lint
2930
uses: golangci/golangci-lint-action@d583c34f0599d37dbac4a198b9c83201be380893 # v9.3.0
3031
with:
3132
version: v2.12.2
3233

34+
checks:
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
steps:
39+
- uses: actions/checkout@v7
40+
41+
- name: Set up Go
42+
uses: actions/setup-go@v6
43+
with:
44+
go-version: '1.26.4'
45+
46+
- name: Check formatting
47+
run: |
48+
unformatted=$(gofmt -l .)
49+
if [ -n "$unformatted" ]; then
50+
echo "The following files are not gofmt-formatted:"
51+
echo "$unformatted"
52+
exit 1
53+
fi
54+
55+
- name: Verify go.mod/go.sum are tidy
56+
run: |
57+
go mod tidy
58+
git diff --exit-code go.mod go.sum
59+
60+
- name: go vet
61+
run: go vet ./...
62+
3363
test:
3464
runs-on: ubuntu-latest
3565
permissions:
3666
contents: read
3767
steps:
38-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@v7
3969

4070
- name: Set up Go
41-
uses: actions/setup-go@v5
71+
uses: actions/setup-go@v6
4272
with:
43-
go-version: '1.26.1'
73+
go-version: '1.26.4'
4474

4575
- name: Setup CI environment
4676
run: ./scripts/ci-setup.sh
4777

48-
- name: Run tests
49-
run: go test -v ./...
78+
- name: Run tests (race detector + coverage)
79+
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...
80+
81+
- name: Upload coverage report
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: coverage
85+
path: coverage.out
86+
if-no-files-found: ignore

.github/workflows/codeql.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '30 2 * * 1'
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: codeql-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
analyze:
20+
name: Analyze (Go)
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
security-events: write
25+
steps:
26+
- uses: actions/checkout@v7
27+
28+
- name: Set up Go
29+
uses: actions/setup-go@v6
30+
with:
31+
go-version: '1.26.4'
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: go
37+
38+
- name: Autobuild
39+
uses: github/codeql-action/autobuild@v3
40+
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v3
43+
with:
44+
category: "/language:go"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: dependency-review-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
dependency-review:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@v7
21+
22+
- name: Dependency Review
23+
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
24+
with:
25+
fail-on-severity: high

.github/workflows/docker-image.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
group: docker-image-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317

1418
build:

.github/workflows/go-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
permissions:
1212
contents: read
1313

14+
concurrency:
15+
group: go-build-${{ github.ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
build:
1620
runs-on: ubuntu-latest

.github/workflows/security-scan.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ name: Security Scan
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ master ]
88
schedule:
99
- cron: '0 2 * * 1'
1010

1111
permissions:
1212
contents: read
1313
security-events: write
1414

15+
concurrency:
16+
group: security-scan-${{ github.ref }}
17+
cancel-in-progress: true
18+
1519
jobs:
1620
dependency-scan:
1721
runs-on: ubuntu-latest

api/audit.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,3 @@ func (h *AuditHandler) HandleGetResourceHistory(w http.ResponseWriter, r *http.R
102102
"resource_id": resourceID,
103103
})
104104
}
105-

api/balance.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ func (h *BalanceHandler) HandleGet(w http.ResponseWriter, r *http.Request) {
4040

4141
writeJSON(w, http.StatusOK, models.BalanceResponse{Balances: balances})
4242
}
43-

api/invoice.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,3 @@ func (h *InvoiceHandler) HandleCancel(w http.ResponseWriter, r *http.Request) {
9292

9393
writeJSON(w, http.StatusOK, models.InvoiceResponse{Invoice: invoice})
9494
}
95-

0 commit comments

Comments
 (0)