0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-05-14 03:12:18 +00:00
crazy-max_diun/vendor/github.com/crazy-max/gohealthchecks/Dockerfile
dependabot[bot] a12e347d9b
chore(deps): bump github.com/crazy-max/gohealthchecks
Bumps [github.com/crazy-max/gohealthchecks](https://github.com/crazy-max/gohealthchecks) from 0.4.1 to 0.5.0.
- [Release notes](https://github.com/crazy-max/gohealthchecks/releases)
- [Commits](https://github.com/crazy-max/gohealthchecks/compare/v0.4.1...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/crazy-max/gohealthchecks
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 07:25:06 +00:00

31 lines
900 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION="1.23"
ARG GOLANGCI_LINT_VERSION="v1.62"
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
FROM golang:${GO_VERSION}-alpine AS base
ENV GOFLAGS="-buildvcs=false"
RUN apk add --no-cache gcc linux-headers musl-dev
WORKDIR /src
FROM base AS test
ARG GO_VERSION
ENV CGO_ENABLED=1
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build <<EOT
set -ex
go test -v -coverprofile=/tmp/coverage.txt -covermode=atomic -race ./...
go tool cover -func=/tmp/coverage.txt
EOT
FROM scratch AS test-coverage
COPY --from=test /tmp/coverage*.txt /
FROM base AS lint
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint run ./...