Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 22:15 UTC
ci: set proper build tags in golangci and minor cleanup (#7183)
* ci: set proper build tags in golangci and minor cleanup * clean * review --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Kévin Dunglas committed
Aug 21, 2025 at 22:43 UTC
493898d9bd05da8e4ced1941b87b174fbc6b7677
3 files changed
+11
-6
.github/workflows/ci.yml
+4
-3
@@ -13,6 +13,7 @@ on:
13
- 2.*
14
15
env:
16
+ GOFLAGS: '-tags=nobadger,nomysql,nopgx'
17
# https://github.com/actions/setup-go/issues/491
18
GOTOOLCHAIN: local
19
@@ -110,7 +111,7 @@ jobs:
111
env:
112
CGO_ENABLED: 0
113
run: |
113
- go build -tags nobadger,nomysql,nopgx -trimpath -ldflags="-w -s" -v
114
+ go build -trimpath -ldflags="-w -s" -v
115
116
- name: Smoke test Caddy
117
working-directory: ./cmd/caddy
@@ -133,7 +134,7 @@ jobs:
134
# continue-on-error: true
135
run: |
136
# (go test -v -coverprofile=cover-profile.out -race ./... 2>&1) > test-results/test-result.out
136
- go test -tags nobadger,nomysql,nopgx -v -coverprofile="cover-profile.out" -short -race ./...
137
+ go test -v -coverprofile="cover-profile.out" -short -race ./...
138
# echo "status=$?" >> $GITHUB_OUTPUT
139
140
# Relevant step if we reinvestigate publishing test/coverage reports
@@ -190,7 +191,7 @@ jobs:
191
retries=3
192
exit_code=0
193
while ((retries > 0)); do
193
- CGO_ENABLED=0 go test -p 1 -tags nobadger,nomysql,nopgx -v ./...
194
+ CGO_ENABLED=0 go test -p 1 -v ./...
195
exit_code=$?
196
if ((exit_code == 0)); then
197
break
.github/workflows/cross-build.yml
+3
-3
@@ -11,6 +11,8 @@ on:
11
- 2.*
12
13
env:
14
+ GOFLAGS: '-tags=nobadger,nomysql,nopgx'
15
+ CGO_ENABLED: '0'
16
# https://github.com/actions/setup-go/issues/491
17
GOTOOLCHAIN: local
18
@@ -74,11 +76,9 @@ jobs:
76
77
- name: Run Build
78
env:
77
- CGO_ENABLED: 0
79
GOOS: ${{ matrix.goos }}
80
GOARCH: ${{ matrix.goos == 'aix' && 'ppc64' || 'amd64' }}
81
shell: bash
82
continue-on-error: true
83
working-directory: ./cmd/caddy
83
- run: |
84
- GOOS=$GOOS GOARCH=$GOARCH go build -tags=nobadger,nomysql,nopgx -trimpath -o caddy-"$GOOS"-$GOARCH 2> /dev/null
84
+ run: go build -trimpath -o caddy-"$GOOS"-$GOARCH 2> /dev/null
.golangci.yml
+4
@@ -2,6 +2,10 @@ version: "2"
2
run:
3
issues-exit-code: 1
4
tests: false
5
+ build-tags:
6
+ - nobadger
7
+ - nomysql
8
+ - nopgx
9
output:
10
formats:
11
text: