Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: allow using the toolchain Go "toolchain" #6846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- master
- 2.*

env:
# https://github.com/actions/setup-go/issues/491
GOTOOLCHAIN: local

jobs:
test:
strategy:
Expand Down Expand Up @@ -99,7 +103,7 @@ jobs:
env:
CGO_ENABLED: 0
run: |
go build -tags nobadger -trimpath -ldflags="-w -s" -v
go build -tags nobadger,nomysql,nopgx -trimpath -ldflags="-w -s" -v

- name: Smoke test Caddy
working-directory: ./cmd/caddy
Expand All @@ -122,7 +126,7 @@ jobs:
# continue-on-error: true
run: |
# (go test -v -coverprofile=cover-profile.out -race ./... 2>&1) > test-results/test-result.out
go test -tags nobadger -v -coverprofile="cover-profile.out" -short -race ./...
go test -tags nobadger,nomysql,nopgx -v -coverprofile="cover-profile.out" -short -race ./...
# echo "status=$?" >> $GITHUB_OUTPUT

# Relevant step if we reinvestigate publishing test/coverage reports
Expand Down Expand Up @@ -170,7 +174,7 @@ jobs:
retries=3
exit_code=0
while ((retries > 0)); do
CGO_ENABLED=0 go test -p 1 -tags nobadger -v ./...
CGO_ENABLED=0 go test -p 1 -tags nobadger,nomysql,nopgx -v ./...
exit_code=$?
if ((exit_code == 0)); then
break
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cross-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- master
- 2.*

env:
# https://github.com/actions/setup-go/issues/491
GOTOOLCHAIN: local

jobs:
build:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
permissions:
contents: read

env:
# https://github.com/actions/setup-go/issues/491
GOTOOLCHAIN: local

jobs:
# From https://github.com/golangci/golangci-lint-action
golangci:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'v*.*.*'

env:
# https://github.com/actions/setup-go/issues/491
GOTOOLCHAIN: local

jobs:
release:
name: Release
Expand Down
Loading