Maintenance: set entrypoint for test Docker stage
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -34,13 +34,7 @@ jobs:
|
|||||||
touch coverage.txt
|
touch coverage.txt
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v "$(pwd)/coverage.txt:/tmp/gobuild/coverage.txt" \
|
-v "$(pwd)/coverage.txt:/tmp/gobuild/coverage.txt" \
|
||||||
test-container \
|
test-container
|
||||||
go test \
|
|
||||||
-race \
|
|
||||||
-coverpkg=./... \
|
|
||||||
-coverprofile=coverage.txt \
|
|
||||||
-covermode=atomic \
|
|
||||||
./...
|
|
||||||
|
|
||||||
- name: Code security analysis
|
- name: Code security analysis
|
||||||
uses: snyk/actions/golang@master
|
uses: snyk/actions/golang@master
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ FROM --platform=$BUILDPLATFORM base AS test
|
|||||||
# - we install g++ to support the race detector
|
# - we install g++ to support the race detector
|
||||||
ENV CGO_ENABLED=1
|
ENV CGO_ENABLED=1
|
||||||
RUN apk --update --no-cache add g++
|
RUN apk --update --no-cache add g++
|
||||||
|
ENTRYPOINT go test -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM base AS lint
|
FROM --platform=$BUILDPLATFORM base AS lint
|
||||||
ARG GOLANGCI_LINT_VERSION=v1.40.1
|
ARG GOLANGCI_LINT_VERSION=v1.40.1
|
||||||
|
|||||||
Reference in New Issue
Block a user