From b54f753feeefa39f138b600b1623f6e6741e6dca Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Thu, 9 May 2024 17:44:28 +0200 Subject: [PATCH] add test to CI for example directory --- .github/workflows/ci.yml | 10 +++++++++- examples/plugin/Dockerfile | 2 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7daf2cc6..9d31fa10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,12 +22,20 @@ jobs: - name: build and test run: | - go test -v -timeout=100s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... + go test -race -v -timeout=100s -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... + go build -race ./... cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "mocks" | grep -v "_mock" > $GITHUB_WORKSPACE/profile.cov working-directory: app env: TZ: "America/Chicago" + - name: test examples + run: | + go test -race ./... + go build -race ./... + working-directory: examples/plugin + env: + TZ: "America/Chicago" - name: golangci-lint uses: golangci/golangci-lint-action@v6 diff --git a/examples/plugin/Dockerfile b/examples/plugin/Dockerfile index e34f139e..16c93921 100644 --- a/examples/plugin/Dockerfile +++ b/examples/plugin/Dockerfile @@ -8,8 +8,6 @@ WORKDIR /build RUN go build -o /build/plugin-example -ldflags "-X main.revision=${version} -s -w" -FROM ghcr.io/umputun/baseimage/app:v1.6.1 as base - FROM scratch COPY --from=build /build/plugin-example /srv/plugin-example