httpserver: added default response body for client and server errors; #4103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gosoline | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
terraform-fmt: | |
name: terraform fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Execute terraform fmt -check -recursive . | |
run: terraform fmt -check -recursive . | |
go-fumpt: | |
name: go fumpt v0.7.0 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Setup gofumpt | |
run: go install mvdan.cc/gofumpt@v0.7.0 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Execute gofumpt -l . | |
run: gofumpt -l . | |
- name: Execute test -z $(gofumpt -l .) | |
run: test -z $(gofumpt -l .) | |
mockery: | |
name: mockery | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Install mockery | |
run: go install github.com/vektra/mockery/v2@v2.46.0 | |
- name: Execute mockery | |
run: go generate -run='mockery' ./... | |
- name: Check for empty diff | |
run: | | |
git add -A * | |
changes=$(git status -s | grep -E '^[ ]?M|A') || true | |
if [ "0" != $(echo -n $changes | wc -c) ]; then | |
git status -s | grep -E '^[ ]?M|A' | |
echo "please check the file list above and (re-)create those mocks locally with the mockery version v2.43.2!" | |
echo "here's the diff:" | |
git diff HEAD~0 | |
echo "end of diff" | |
exit 1 | |
fi | |
build: | |
name: go build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Build | |
run: go build -v ./... | |
go-vet: | |
name: static code analysis (go vet) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Static code analysis | |
run: go vet ./... | |
golangci-lint: | |
name: static code analysis (golangci-lint) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Static code analysis (golangci-lint) | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61.0 | |
only-new-issues: true | |
args: -v --build-tags fixtures,integration --timeout 5m --print-issued-lines --print-linter-name | |
go-test: | |
name: go test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Test | |
run: go test ./... | |
go-test-race: | |
name: go test (race) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Test (race) | |
run: go test -race ./... | |
go-test-integration: | |
name: go test (integration) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Integration tests | |
run: go test -p 2 --tags='integration,fixtures' ./test/... | |
go-test-integration-race: | |
name: go test (integration, race) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Integration tests (race) | |
run: go test -p 2 -race --tags='integration,fixtures' ./test/... |