Merge pull request #1196 from strukturag/golang-1.26

CI: Test with Golang 1.26
This commit is contained in:
Joachim Bauch 2026-02-12 08:51:58 +01:00 committed by GitHub
commit 083858294a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 9 deletions

View file

@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.25"
go-version: "1.26"
- name: moderize
run: |
@ -63,7 +63,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.25"
go-version: "1.26"
check-latest: true
- name: checklocks

View file

@ -26,6 +26,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@ -50,6 +51,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
needs: [create]
steps:
@ -95,6 +97,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
needs: [create]
steps:

View file

@ -28,6 +28,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@ -51,6 +52,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@ -71,6 +73,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@ -91,6 +94,7 @@ jobs:
go-version:
- "1.24"
- "1.25"
- "1.26"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

View file

@ -6,7 +6,7 @@ GODIR := $(shell dirname "$(GO)")
GOFMT := "$(GODIR)/gofmt"
GOOS ?= linux
GOARCH ?= amd64
GOVERSION := $(shell "$(GO)" env GOVERSION | sed "s|go||" )
GOVERSION := $(shell "$(GO)" env GOVERSION | sed -E 's|go([0-9]+\.[0-9]+)\..*|\1|')
TMPDIR := $(CURDIR)/tmp
BINDIR := $(CURDIR)/bin
VENDORDIR := "$(CURDIR)/vendor"
@ -77,6 +77,12 @@ else
GOPATHBIN := $(GOPATH)/bin/$(GOOS)_$(GOARCH)
endif
ifeq ($(GOVERSION), 1.24)
GOEXPERIMENT := synctest
else
GOEXPERIMENT :=
endif
hook:
[ ! -d "$(CURDIR)/.git/hooks" ] || ln -sf "$(CURDIR)/scripts/pre-commit.hook" "$(CURDIR)/.git/hooks/pre-commit"
@ -110,24 +116,24 @@ fmt: hook | $(PROTO_GO_FILES)
$(GOFMT) -s -w *.go cmd/client cmd/proxy cmd/server
vet:
GOEXPERIMENT=synctest $(GO) vet ./...
GOEXPERIMENT=$(GOEXPERIMENT) $(GO) vet ./...
test: vet
GOEXPERIMENT=synctest $(GO) test -timeout $(TIMEOUT) $(TESTARGS) ./...
GOEXPERIMENT=$(GOEXPERIMENT) $(GO) test -timeout $(TIMEOUT) $(TESTARGS) ./...
benchmark:
GOEXPERIMENT=synctest $(GO) test -bench=$(BENCHMARK) -benchmem -run=^$$ -timeout $(TIMEOUT) $(TESTARGS) ./...
GOEXPERIMENT=$(GOEXPERIMENT) $(GO) test -bench=$(BENCHMARK) -benchmem -run=^$$ -timeout $(TIMEOUT) $(TESTARGS) ./...
checklocks: $(GOPATHBIN)/checklocks
GOEXPERIMENT=synctest go vet -vettool=$(GOPATHBIN)/checklocks ./...
GOEXPERIMENT=$(GOEXPERIMENT) go vet -vettool=$(GOPATHBIN)/checklocks ./...
cover: vet
rm -f cover.out && \
GOEXPERIMENT=synctest $(GO) test -timeout $(TIMEOUT) -coverprofile cover.out ./...
GOEXPERIMENT=$(GOEXPERIMENT) $(GO) test -timeout $(TIMEOUT) -coverprofile cover.out ./...
coverhtml: vet
rm -f cover.out && \
GOEXPERIMENT=synctest $(GO) test -timeout $(TIMEOUT) -coverprofile cover.out ./... && \
GOEXPERIMENT=$(GOEXPERIMENT) $(GO) test -timeout $(TIMEOUT) -coverprofile cover.out ./... && \
sed -i "/_easyjson/d" cover.out && \
sed -i "/\.pb\.go/d" cover.out && \
$(GO) tool cover -html=cover.out -o coverage.html

View file

@ -1,3 +1,5 @@
//go:build go1.25
/**
* Standalone signaling server for the Nextcloud Spreed app.
* Copyright (C) 2021 struktur AG

View file

@ -1,3 +1,5 @@
//go:build go1.25
/**
* Standalone signaling server for the Nextcloud Spreed app.
* Copyright (C) 2021 struktur AG

View file

@ -1,3 +1,5 @@
//go:build go1.25
/**
* Standalone signaling server for the Nextcloud Spreed app.
* Copyright (C) 2022 struktur AG