mirror of https://github.com/docker/compose.git
Merge pull request #1534 from chris-crone/bump-lint
This commit is contained in:
commit
c65ded9d1a
|
@ -32,12 +32,12 @@ jobs:
|
|||
env:
|
||||
BUILD_TAGS: kube,e2e
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.37.0
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.39.0
|
||||
make -f builder.Makefile lint
|
||||
|
||||
# only on main branch, costs too much for the gain on every PR
|
||||
validate-cross-build:
|
||||
name: Validate cros build
|
||||
name: Validate cross build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
env:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# syntax=docker/dockerfile:experimental
|
||||
# syntax=docker/dockerfile:1.2
|
||||
|
||||
|
||||
# Copyright 2020 Docker Compose CLI authors
|
||||
|
@ -16,13 +16,12 @@
|
|||
# limitations under the License.
|
||||
|
||||
ARG GO_VERSION=1.16-alpine
|
||||
ARG GOLANGCI_LINT_VERSION=v1.37.0-alpine
|
||||
ARG GOLANGCI_LINT_VERSION=v1.39.0-alpine
|
||||
ARG PROTOC_GEN_GO_VERSION=v1.4.3
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS base
|
||||
WORKDIR /compose-cli
|
||||
ENV GO111MODULE=on
|
||||
RUN apk add --no-cache \
|
||||
RUN apk add --no-cache -vv \
|
||||
git \
|
||||
docker \
|
||||
make \
|
||||
|
|
|
@ -34,10 +34,10 @@ services:
|
|||
max: 10
|
||||
`, useDefaultVPC)
|
||||
target := template.Resources["FooScalableTarget"].(*autoscaling.ScalableTarget)
|
||||
assert.Check(t, target != nil)
|
||||
assert.Check(t, target != nil) //nolint:staticcheck
|
||||
assert.Check(t, target.MaxCapacity == 10) //nolint:staticcheck
|
||||
|
||||
policy := template.Resources["FooScalingPolicy"].(*autoscaling.ScalingPolicy)
|
||||
assert.Check(t, policy != nil)
|
||||
assert.Check(t, policy != nil) //nolint:staticcheck
|
||||
assert.Check(t, policy.TargetTrackingScalingPolicyConfiguration.TargetValue == float64(75)) //nolint:staticcheck
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ networks:
|
|||
assert.Check(t, template.Resources["DefaultNetwork"] == nil)
|
||||
assert.Check(t, template.Resources["DefaultNetworkIngress"] == nil)
|
||||
s := template.Resources["TestService"].(*ecs.Service)
|
||||
assert.Check(t, s != nil)
|
||||
assert.Check(t, s != nil) //nolint:staticcheck
|
||||
assert.Check(t, s.NetworkConfiguration.AwsvpcConfiguration.SecurityGroups[0] == "sg-123abc") //nolint:staticcheck
|
||||
}
|
||||
|
||||
|
@ -383,11 +383,11 @@ volumes:
|
|||
m.ResolveFileSystem(gomock.Any(), "fs-123abc").Return(existingAWSResource{id: "fs-123abc"}, nil)
|
||||
})
|
||||
s := template.Resources["DbdataNFSMountTargetOnSubnet1"].(*efs.MountTarget)
|
||||
assert.Check(t, s != nil)
|
||||
assert.Check(t, s != nil) //nolint:staticcheck
|
||||
assert.Equal(t, s.FileSystemId, "fs-123abc") //nolint:staticcheck
|
||||
|
||||
s = template.Resources["DbdataNFSMountTargetOnSubnet2"].(*efs.MountTarget)
|
||||
assert.Check(t, s != nil)
|
||||
assert.Check(t, s != nil) //nolint:staticcheck
|
||||
assert.Equal(t, s.FileSystemId, "fs-123abc") //nolint:staticcheck
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ volumes:
|
|||
})
|
||||
n := volumeResourceName("db-data")
|
||||
f := template.Resources[n].(*efs.FileSystem)
|
||||
assert.Check(t, f != nil)
|
||||
assert.Check(t, f != nil) //nolint:staticcheck
|
||||
assert.Equal(t, f.BackupPolicy.Status, "ENABLED") //nolint:staticcheck
|
||||
assert.Equal(t, f.LifecyclePolicies[0].TransitionToIA, "AFTER_30_DAYS") //nolint:staticcheck
|
||||
assert.Equal(t, f.PerformanceMode, "maxIO") //nolint:staticcheck
|
||||
|
@ -420,7 +420,7 @@ volumes:
|
|||
assert.Equal(t, f.ProvisionedThroughputInMibps, float64(1024)) //nolint:staticcheck
|
||||
|
||||
s := template.Resources["DbdataNFSMountTargetOnSubnet1"].(*efs.MountTarget)
|
||||
assert.Check(t, s != nil)
|
||||
assert.Check(t, s != nil) //nolint:staticcheck
|
||||
assert.Equal(t, s.FileSystemId, cloudformation.Ref(n)) //nolint:staticcheck
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ volumes:
|
|||
m.ListFileSystems(gomock.Any(), gomock.Any()).Return(nil, nil)
|
||||
})
|
||||
a := template.Resources["DbdataAccessPoint"].(*efs.AccessPoint)
|
||||
assert.Check(t, a != nil)
|
||||
assert.Check(t, a != nil) //nolint:staticcheck
|
||||
assert.Equal(t, a.PosixUser.Uid, "1002") //nolint:staticcheck
|
||||
assert.Equal(t, a.PosixUser.Gid, "1002") //nolint:staticcheck
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ volumes:
|
|||
}, nil)
|
||||
})
|
||||
s := template.Resources["DbdataNFSMountTargetOnSubnet1"].(*efs.MountTarget)
|
||||
assert.Check(t, s != nil)
|
||||
assert.Check(t, s != nil) //nolint:staticcheck
|
||||
assert.Equal(t, s.FileSystemId, "fs-123abc") //nolint:staticcheck
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue