mirror of
https://github.com/restic/restic.git
synced 2026-10-03 09:20:30 +00:00
@@ -13,7 +13,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
latest_go: "1.26.x"
|
||||
latest_go: "1.27.x"
|
||||
GO111MODULE: on
|
||||
|
||||
jobs:
|
||||
@@ -23,27 +23,32 @@ jobs:
|
||||
# list of jobs to run:
|
||||
include:
|
||||
- job_name: Windows
|
||||
go: 1.26.x
|
||||
go: 1.27.x
|
||||
os: windows-latest
|
||||
|
||||
- job_name: macOS
|
||||
go: 1.26.x
|
||||
go: 1.27.x
|
||||
os: macOS-latest
|
||||
test_fuse: false
|
||||
|
||||
- job_name: Linux
|
||||
go: 1.26.x
|
||||
go: 1.27.x
|
||||
os: ubuntu-latest
|
||||
test_cloud_backends: true
|
||||
test_fuse: true
|
||||
check_changelog: true
|
||||
|
||||
- job_name: Linux (race)
|
||||
go: 1.26.x
|
||||
go: 1.27.x
|
||||
os: ubuntu-latest
|
||||
test_fuse: true
|
||||
test_opts: "-race"
|
||||
|
||||
- job_name: Linux
|
||||
go: 1.26.x
|
||||
os: ubuntu-latest
|
||||
test_fuse: true
|
||||
|
||||
- job_name: Linux
|
||||
go: 1.25.x
|
||||
os: ubuntu-latest
|
||||
@@ -266,7 +271,7 @@ jobs:
|
||||
uses: golangci/golangci-lint-action@v9
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||
version: v2.12
|
||||
version: v2.13
|
||||
args: --verbose --timeout 5m
|
||||
|
||||
# only run golangci-lint for pull requests, otherwise ALL hints get
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ linters:
|
||||
text: "package-comments: should have a package comment"
|
||||
# staticcheck: there's no easy way to replace these packages
|
||||
- path: (.+)\.go$
|
||||
text: 'SA1019: "golang.org/x/crypto/poly1305" is deprecated'
|
||||
text: 'SA1019: golang.org/x/crypto/poly1305 is deprecated'
|
||||
- path: (.+)\.go$
|
||||
text: "redefines-builtin-id:"
|
||||
# revive: collection of helpers to implement a backend, more descriptive names would be too repetitive
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.26-alpine AS builder
|
||||
FROM golang:1.27-alpine AS builder
|
||||
|
||||
WORKDIR /go/src/github.com/restic/restic
|
||||
|
||||
|
||||
@@ -112,36 +112,36 @@ func newSeaweedFSTestSuite(t testing.TB) (*test.Suite[s3.Config], func()) {
|
||||
cleanup := runSeaweedFS(ctx, t, tempdir, key, secret)
|
||||
|
||||
return &test.Suite[s3.Config]{
|
||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||
NewConfig: func() (*s3.Config, error) {
|
||||
cfg := s3.NewConfig()
|
||||
cfg.Endpoint = seaweedFSS3Addr
|
||||
cfg.Bucket = "restictestbucket"
|
||||
cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano())
|
||||
cfg.UseHTTP = true
|
||||
cfg.Region = "us-east-1"
|
||||
cfg.BucketLookup = "path"
|
||||
cfg.KeyID = key
|
||||
cfg.Secret = options.NewSecretString(secret)
|
||||
return &cfg, nil
|
||||
},
|
||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||
NewConfig: func() (*s3.Config, error) {
|
||||
cfg := s3.NewConfig()
|
||||
cfg.Endpoint = seaweedFSS3Addr
|
||||
cfg.Bucket = "restictestbucket"
|
||||
cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano())
|
||||
cfg.UseHTTP = true
|
||||
cfg.Region = "us-east-1"
|
||||
cfg.BucketLookup = "path"
|
||||
cfg.KeyID = key
|
||||
cfg.Secret = options.NewSecretString(secret)
|
||||
return &cfg, nil
|
||||
},
|
||||
|
||||
Factory: location.NewHTTPBackendFactory("s3", s3.ParseConfig, location.NoPassword, func(ctx context.Context, cfg s3.Config, rt http.RoundTripper, errorLog func(string, ...any)) (be backend.Backend, err error) {
|
||||
for i := range 50 {
|
||||
be, err = s3.Create(ctx, cfg, rt, errorLog)
|
||||
if err != nil {
|
||||
t.Logf("s3 open: try %d: error %v", i, err)
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
continue
|
||||
}
|
||||
break
|
||||
Factory: location.NewHTTPBackendFactory("s3", s3.ParseConfig, location.NoPassword, func(ctx context.Context, cfg s3.Config, rt http.RoundTripper, errorLog func(string, ...any)) (be backend.Backend, err error) {
|
||||
for i := range 50 {
|
||||
be, err = s3.Create(ctx, cfg, rt, errorLog)
|
||||
if err != nil {
|
||||
t.Logf("s3 open: try %d: error %v", i, err)
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
continue
|
||||
}
|
||||
return be, err
|
||||
}, s3.Open),
|
||||
}, func() {
|
||||
defer cancel()
|
||||
defer cleanup()
|
||||
}
|
||||
break
|
||||
}
|
||||
return be, err
|
||||
}, s3.Open),
|
||||
}, func() {
|
||||
defer cancel()
|
||||
defer cleanup()
|
||||
}
|
||||
}
|
||||
|
||||
func TestBackendSeaweedFS(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user