From 2662d3566e1d2d903b4f8fb3603e44621b6a1315 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Tue, 25 May 2021 11:28:31 -0400 Subject: [PATCH 1/3] Integrate with github actions --- .github/workflows/lint.yml | 16 ++++++++++++++++ .github/workflows/test-unit.yml | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test-unit.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..7b5f152 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,16 @@ +name: lint +on: + pull_request: {} + +jobs: + unit: + name: lint + runs-on: ubuntu-18.04 + steps: + - uses: actions/setup-go@v2 + with: + go-version: 1.16 + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: make lint diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml new file mode 100644 index 0000000..764b7d6 --- /dev/null +++ b/.github/workflows/test-unit.yml @@ -0,0 +1,19 @@ +name: test-unit +on: + pull_request: {} + +jobs: + unit: + name: unit + runs-on: ubuntu-18.04 + steps: + - uses: actions/setup-go@v2 + with: + go-version: 1.16 + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: make test + - uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: coverage.out From cbd86b43e697de1efcab299096561b19da524672 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Tue, 25 May 2021 11:48:44 -0400 Subject: [PATCH 2/3] rename job --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7b5f152..f745243 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,7 +3,7 @@ on: pull_request: {} jobs: - unit: + lint: name: lint runs-on: ubuntu-18.04 steps: From 14e957a96749cb059944e54cc38ec371b12a045d Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Tue, 25 May 2021 11:54:01 -0400 Subject: [PATCH 3/3] Use go test instead of ginkgo to run the tests --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 06223d4..d02813c 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,6 @@ lint: @go fmt ./... test: - @ginkgo ./... + @go test -coverprofile=coverage.out -covermode=count -short ./... .PHONY: test lint