From d416b000525c35991c24ae927757c4a5c2f89a63 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 20:40:39 +0200 Subject: [PATCH 01/10] fix test --- .github/workflows/go.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5f86d25..df47fc9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master ] + branches: [ master, code-coverage ] pull_request: - branches: [ master ] + branches: [ master, code-coverage ] jobs: build: @@ -22,3 +22,23 @@ jobs: - name: Test run: go test -v ./... + + coverage: + runs-on: ubuntu-latest + steps: + - name: Install Go + if: success() + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - name: Checkout code + uses: actions/checkout@v2 + - name: Calc coverage + run: go test -v -covermode=count -coverprofile=coverage.out + - name: Convert coverage to lcov + uses: jandelgado/gcov2lcov-action@v1.0.8 + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.cover_token }} + path-to-lcov: coverage.lcov \ No newline at end of file From bee1ba84ba06df660443e4dd7aae3b27a92ef581 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 20:41:53 +0200 Subject: [PATCH 02/10] fix test --- .github/workflows/go.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index df47fc9..5a0642a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,11 +26,10 @@ jobs: coverage: runs-on: ubuntu-latest steps: - - name: Install Go - if: success() - uses: actions/setup-go@v2 - with: - go-version: 1.16 + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 - name: Checkout code uses: actions/checkout@v2 - name: Calc coverage From d14c25a63265f77f4e2ddd0a4192c7d86560dc10 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 20:43:51 +0200 Subject: [PATCH 03/10] fix test --- .github/workflows/go.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5a0642a..59073a3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -36,6 +36,9 @@ jobs: run: go test -v -covermode=count -coverprofile=coverage.out - name: Convert coverage to lcov uses: jandelgado/gcov2lcov-action@v1.0.8 + with: + infile: coverage.out # optional, default filename is `coverage.out` + outfile: coverage.lcov # optional, default filename is `coverage.lcov` - name: Coveralls uses: coverallsapp/github-action@v1.1.2 with: From a38782c20c6f047f317f5eca5422357680bf4d7d Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 20:44:41 +0200 Subject: [PATCH 04/10] fix test --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 59073a3..3d6807c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Calc coverage - run: go test -v -covermode=count -coverprofile=coverage.out + run: go test -v -covermode=count -coverprofile=coverage.out ./... - name: Convert coverage to lcov uses: jandelgado/gcov2lcov-action@v1.0.8 with: From 7b9dc08b338d766c54942ef4008fbf05db28fc07 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 20:47:46 +0200 Subject: [PATCH 05/10] fix test --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3d6807c..3dbe879 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -42,5 +42,5 @@ jobs: - name: Coveralls uses: coverallsapp/github-action@v1.1.2 with: - github-token: ${{ secrets.cover_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: coverage.lcov \ No newline at end of file From f489aa78e9408739e8f5c60a315a7d14af508920 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 20:58:01 +0200 Subject: [PATCH 06/10] fix test --- Jet_test.go | 5 +++++ README.md | 1 + 2 files changed, 6 insertions(+) create mode 100644 Jet_test.go diff --git a/Jet_test.go b/Jet_test.go new file mode 100644 index 0000000..8e53681 --- /dev/null +++ b/Jet_test.go @@ -0,0 +1,5 @@ +package main + +/** +This file is only attempted to help code coverage calculation. + */ \ No newline at end of file diff --git a/README.md b/README.md index ee2b761..ccbd8da 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Jet [![Go](https://github.com/go-gems/Jet/actions/workflows/go.yml/badge.svg)](https://github.com/go-gems/Jet/actions/workflows/go.yml) +[![Coverage Status](https://coveralls.io/repos/github/go-gems/Jet/badge.svg?branch=master)](https://coveralls.io/github/go-gems/Jet?branch=master) To launch : From 3f36017c8aa430a9a64cd901f427b907f201128b Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 21:35:07 +0200 Subject: [PATCH 07/10] fix test --- .github/workflows/go.yml | 2 +- Jet.go | 2 ++ Jet_test.go | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3dbe879..107a375 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Calc coverage - run: go test -v -covermode=count -coverprofile=coverage.out ./... + run: go test -v -covermode=count -coverprofile=coverage.out -tags skip ./... - name: Convert coverage to lcov uses: jandelgado/gcov2lcov-action@v1.0.8 with: diff --git a/Jet.go b/Jet.go index 10260c9..e5ed450 100644 --- a/Jet.go +++ b/Jet.go @@ -1,3 +1,5 @@ +// +build !skip + package main import ( diff --git a/Jet_test.go b/Jet_test.go index 8e53681..12460e3 100644 --- a/Jet_test.go +++ b/Jet_test.go @@ -1,5 +1,10 @@ package main +import "testing" + /** This file is only attempted to help code coverage calculation. - */ \ No newline at end of file + */ +func TestMain(m *testing.M) { + +} \ No newline at end of file From 6a9631a63db02012c77a0bf59e98b528c690da1d Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 21:37:18 +0200 Subject: [PATCH 08/10] fix test --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 107a375..0d644e7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master, code-coverage ] + branches: [ master ] pull_request: - branches: [ master, code-coverage ] + branches: [ master ] jobs: build: From bf2a23b079f76271833728d854a9611ab59f43b0 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 21:45:20 +0200 Subject: [PATCH 09/10] fix test --- .github/workflows/go.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0d644e7..7d75a7f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master ] + branches: [ master, code-coverage ] pull_request: - branches: [ master ] + branches: [ master, code-coverage ] jobs: build: @@ -21,7 +21,7 @@ jobs: run: go build -v ./... - name: Test - run: go test -v ./... + run: go test -v -tags skip ./... coverage: runs-on: ubuntu-latest From e888935012811dfa960a21a546eefbfcfa5d68d6 Mon Sep 17 00:00:00 2001 From: decima Date: Mon, 29 Mar 2021 22:01:55 +0200 Subject: [PATCH 10/10] fix test --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7d75a7f..ed8df90 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master, code-coverage ] + branches: [ master ] pull_request: - branches: [ master, code-coverage ] + branches: [ master ] jobs: build: