diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index d37cea1f..09018b61 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -38,7 +38,7 @@ jobs: - name: test and lint backend run: | - go test -timeout=60s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... + go test -race -timeout=60s -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov $GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/backend/.golangci.yml run ./... working-directory: backend/app diff --git a/Dockerfile b/Dockerfile index fff42efe..f1097461 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ ENV GOFLAGS="-mod=vendor" RUN \ cd app && \ if [ -z "$SKIP_BACKEND_TEST" ] ; then \ - go test -p 1 -timeout="${BACKEND_TEST_TIMEOUT:-300s}" -covermode=count -coverprofile=/profile.cov_tmp ./... && \ + go test -race -p 1 -timeout="${BACKEND_TEST_TIMEOUT:-300s}" -covermode=atomic -coverprofile=/profile.cov_tmp ./... && \ cat /profile.cov_tmp | grep -v "_mock.go" > /profile.cov ; \ golangci-lint run --config ../.golangci.yml ./... ; \ else echo "skip backend tests and linter" ; fi