From 52da8f3fa5a27bace5027eebcc83150c72ee9002 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Thu, 14 Apr 2022 10:38:16 +0300 Subject: [PATCH 1/4] Normalize coverage info before sending to codebeat --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eee3bac..c798732 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,9 @@ jobs: env: CODECLIMATE_API_HOST: https://codebeat.co/webhooks/code_coverage CODECLIMATE_REPO_TOKEN: ${{ secrets.CODECLIMATE_TOKEN }} - run: codeclimate-test-reporter < cover.out + run: | + sed -i 's#/v[0-9]\+/#/#g' cover.out + codeclimate-test-reporter < cover.out Aligo: name: Aligo From 187d3f8aae0d25475d712fe991f9293b06ea373c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 02:32:48 +0000 Subject: [PATCH 2/4] Bump github.com/essentialkaos/check from 1.2.1 to 1.3.0 Bumps [github.com/essentialkaos/check](https://github.com/essentialkaos/check) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/essentialkaos/check/releases) - [Commits](https://github.com/essentialkaos/check/compare/v1.2.1...v1.3.0) --- updated-dependencies: - dependency-name: github.com/essentialkaos/check dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fe8cd00..9b4a0b3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/essentialkaos/go-badge go 1.17 require ( - github.com/essentialkaos/check v1.2.1 + github.com/essentialkaos/check v1.3.0 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 golang.org/x/image v0.0.0-20220321031419-a8550c1d254a ) diff --git a/go.sum b/go.sum index e87bdd3..0b7ad06 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/essentialkaos/check v1.2.1 h1:avvyFy/1acUNwfxwuOLsHeCjfXtMygtbu0lVDr3nxFs= -github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8= +github.com/essentialkaos/check v1.3.0 h1:ria+8o22RCLdt2D/1SHQsEH5Mmy5S+iWHaGHrrbPUc0= +github.com/essentialkaos/check v1.3.0/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= From 298e259c9d45fb6dfbc20862c55d5fc496f3216c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 03:23:06 +0000 Subject: [PATCH 3/4] Bump github/codeql-action from 1 to 2 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0fa9f18..bf5ecc9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,9 +25,9 @@ jobs: fetch-depth: 2 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: go - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From 83ba807137804ea0004e8cf97a07e096054a790f Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Sat, 30 Apr 2022 15:12:30 +0300 Subject: [PATCH 4/4] Improve CI workflow --- .github/workflows/ci.yml | 52 +++++++++++++--------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c798732..2892bcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,6 @@ jobs: env: SRC_DIR: src/github.com/${{ github.repository }} - GO111MODULE: auto strategy: matrix: @@ -29,12 +28,6 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - id: go - - - name: Setup PATH - run: | - echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV" - echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Checkout uses: actions/checkout@v3 @@ -53,33 +46,29 @@ jobs: working-directory: ${{env.SRC_DIR}} run: go test -v -covermode count -coverprofile cover.out ./... - - name: Install goveralls - env: - GO111MODULE: off - run: go get -v github.com/mattn/goveralls - - - name: Send coverage to Coveralls - working-directory: ${{env.SRC_DIR}} + - name: Send coverage data + uses: essentialkaos/goveralls-action@v1 env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: goveralls -service github -coverprofile cover.out + with: + path: ${{env.SRC_DIR}} + profile: cover.out + parallel: true + flag-name: linux-${{ matrix.go }} - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '14.x' + SendCoverage: + name: Send Coverage + runs-on: ubuntu-latest - - name: Install codeclimate-test-reporter - run: npm install -g codeclimate-test-reporter + needs: Go - - name: Send coverage to Codebeat - working-directory: ${{env.SRC_DIR}} + steps: + - name: Finish parallel tests + uses: essentialkaos/goveralls-action@v1 env: - CODECLIMATE_API_HOST: https://codebeat.co/webhooks/code_coverage - CODECLIMATE_REPO_TOKEN: ${{ secrets.CODECLIMATE_TOKEN }} - run: | - sed -i 's#/v[0-9]\+/#/#g' cover.out - codeclimate-test-reporter < cover.out + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + parallel-finished: true Aligo: name: Aligo @@ -89,7 +78,6 @@ jobs: env: SRC_DIR: src/github.com/${{ github.repository }} - GO111MODULE: auto steps: - name: Set up Go @@ -98,12 +86,6 @@ jobs: go-version: '1.17.x' id: go - - name: Setup PATH - run: | - echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV" - echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV" - echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Checkout uses: actions/checkout@v3 with: