From 197eb0c9a0b271dab7b4c3db9ada8d0a24cd67fb Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 12:20:53 +0300 Subject: [PATCH 01/10] Change ci-test-backend.yml --- .github/workflows/ci-test-backend.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index 04d0aef8..cab52232 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -8,13 +8,11 @@ on: - '.github/workflows/ci-test-backend.yml' - 'backend/**' - '!backend/scripts/**' - - '.golangci.yml' pull_request: paths: - '.github/workflows/ci-test-backend.yml' - 'backend/**' - '!backend/scripts/**' - - '.golangci.yml' jobs: backend: @@ -24,11 +22,7 @@ jobs: - uses: actions/checkout@v2 - name: debug if needed - run: | - export DEBUG=${DEBUG:-false} - if [[ "$DEBUG" == "true" ]]; then - env - fi + run: if [[ "$DEBUG" == "true" ]]; then docker version && env; fi env: DEBUG: ${{secrets.DEBUG}} @@ -39,13 +33,14 @@ jobs: - 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 ./... + env: + TZ: "America/Chicago" - name: install golangci-lint and goveralls run: | From cede669c20524de55dc1bb8b2366c12e5e1fc56c Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 12:40:49 +0300 Subject: [PATCH 02/10] Add temporary using action --- .github/workflows/ci-test-backend.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index cab52232..e2e105fa 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -55,8 +55,13 @@ jobs: run: $GITHUB_WORKSPACE/golangci-lint run --config ${GITHUB_WORKSPACE}/backend/.golangci.yml ./... working-directory: backend/_example/memory_store - - name: submit coverage - run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov - working-directory: backend - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov + parallel: true + # - name: submit coverage + # run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov + # working-directory: backend + # env: + # COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b713d0d3f1cf5139ddafc516160e19d713027b9e Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 12:53:23 +0300 Subject: [PATCH 03/10] Add GOPATH --- .github/workflows/ci-test-backend.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index e2e105fa..def55353 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -41,6 +41,7 @@ jobs: go test -race ./... env: TZ: "America/Chicago" + GOPATH: ${{ github.workspace }} - name: install golangci-lint and goveralls run: | @@ -60,6 +61,8 @@ jobs: with: path-to-profile: profile.cov parallel: true + env: + GOPATH: ${{ github.workspace }} # - name: submit coverage # run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov # working-directory: backend From 0b53c4aeaa4ea3043c75b3f48781912027377124 Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 17:25:17 +0300 Subject: [PATCH 04/10] Add go env --- .github/workflows/ci-test-backend.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index def55353..b82aa9a4 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v2 - name: debug if needed - run: if [[ "$DEBUG" == "true" ]]; then docker version && env; fi + run: if [[ "$DEBUG" == "true" ]]; then env; fi env: DEBUG: ${{secrets.DEBUG}} @@ -33,6 +33,7 @@ jobs: - name: test backend run: | + go env date cd backend/app go test -mod=vendor -timeout=60s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... From 1be319b4b929450c8d1973cdad3302acbdbc50de Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 17:40:43 +0300 Subject: [PATCH 05/10] Add working directory arg --- .github/workflows/ci-test-backend.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index b82aa9a4..9081731a 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -62,8 +62,10 @@ jobs: with: path-to-profile: profile.cov parallel: true + working-directory: backend env: GOPATH: ${{ github.workspace }} + # - name: submit coverage # run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov # working-directory: backend From be8706efcfe7c4252d9b738203d82854f8984b73 Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 17:43:49 +0300 Subject: [PATCH 06/10] Fix path to profile.cov --- .github/workflows/ci-test-backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index 9081731a..f1baf7ff 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -60,7 +60,7 @@ jobs: - name: Send coverage uses: shogo82148/actions-goveralls@v1 with: - path-to-profile: profile.cov + path-to-profile: ${{ github.workspace }}/profile.cov parallel: true working-directory: backend env: From e8f1e2d6b019db00b022d1d470aaf4dc30bcfdc8 Mon Sep 17 00:00:00 2001 From: Smolevich Date: Wed, 1 Apr 2020 17:48:10 +0300 Subject: [PATCH 07/10] Remove unused config parts --- .github/workflows/ci-test-backend.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index f1baf7ff..b3690630 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -33,7 +33,6 @@ jobs: - name: test backend run: | - go env date cd backend/app go test -mod=vendor -timeout=60s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... @@ -47,7 +46,6 @@ jobs: - 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.20.0 - go get -u github.com/mattn/goveralls - name: run backend linters run: $GITHUB_WORKSPACE/golangci-lint run --config .golangci.yml ./... @@ -65,9 +63,3 @@ jobs: working-directory: backend env: GOPATH: ${{ github.workspace }} - - # - name: submit coverage - # run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov - # working-directory: backend - # env: - # COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 509b4b66bd3b80aeea618a77b4deb3015622e96c Mon Sep 17 00:00:00 2001 From: Smolevich Date: Thu, 2 Apr 2020 19:52:45 +0300 Subject: [PATCH 08/10] Recover old name of step and remove GOPATH --- .github/workflows/ci-test-backend.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index b3690630..b147f3cb 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -41,7 +41,6 @@ jobs: go test -race ./... env: TZ: "America/Chicago" - GOPATH: ${{ github.workspace }} - name: install golangci-lint and goveralls run: | @@ -55,7 +54,7 @@ jobs: run: $GITHUB_WORKSPACE/golangci-lint run --config ${GITHUB_WORKSPACE}/backend/.golangci.yml ./... working-directory: backend/_example/memory_store - - name: Send coverage + - name: submit coverage uses: shogo82148/actions-goveralls@v1 with: path-to-profile: ${{ github.workspace }}/profile.cov From 11c7f4ff55d86f7fb4baf54873f1a028ed6b6511 Mon Sep 17 00:00:00 2001 From: Smolevich Date: Thu, 2 Apr 2020 19:54:09 +0300 Subject: [PATCH 09/10] Remove GOPATH from last step --- .github/workflows/ci-test-backend.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index b147f3cb..cd2c10e7 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -60,5 +60,3 @@ jobs: path-to-profile: ${{ github.workspace }}/profile.cov parallel: true working-directory: backend - env: - GOPATH: ${{ github.workspace }} From a404b8a87abe36db1efcc25010bd55a56942ff87 Mon Sep 17 00:00:00 2001 From: Smolevich Date: Mon, 6 Apr 2020 11:27:27 +0300 Subject: [PATCH 10/10] Try to delete parallel flag --- .github/workflows/ci-test-backend.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-test-backend.yml b/.github/workflows/ci-test-backend.yml index b84be27f..827e29f1 100644 --- a/.github/workflows/ci-test-backend.yml +++ b/.github/workflows/ci-test-backend.yml @@ -58,5 +58,4 @@ jobs: uses: shogo82148/actions-goveralls@v1 with: path-to-profile: ${{ github.workspace }}/profile.cov - parallel: true working-directory: backend