diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index 9820aa96..0186a0f9 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -35,34 +35,33 @@ jobs: - name: install go uses: actions/setup-go@v1 with: - go-version: 1.14 - - - name: test backend - run: | - export TZ="America/Chicago" - date - cd backend/app - go test -mod=vendor -timeout=60s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... - cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov - cd ../_example/memory_store - go test -race ./... + go-version: 1.13 - name: install golangci-lint and goveralls run: | - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.24.0 + curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.23.0 go get -u github.com/mattn/goveralls - - name: run backend linters - run: $GITHUB_WORKSPACE/golangci-lint run ./... - working-directory: backend - - - name: run linters for examples + - name: test and lint backend run: | - cp ${GITHUB_WORKSPACE}/backend/.golangci.yml .golangci.yml - $GITHUB_WORKSPACE/golangci-lint run ./... + go test -timeout=60s -covermode=count -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 + env: + GOFLAGS: "-mod=vendor" + TZ: "America/Chicago" + + - name: tast and lint examples + run: | + go version + $GITHUB_WORKSPACE/golangci-lint version + go test -race ./... + $GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/backend/.golangci.yml run ./... working-directory: backend/_example/memory_store env: - GOFLAGS: "-mod=mod" +# GOFLAGS: "-mod=mod" + TZ: "America/Chicago" - name: submit coverage run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov