From 9ee368f10dc8ea48c79ff69d41bac0d66048bba6 Mon Sep 17 00:00:00 2001 From: Densest Void Date: Fri, 31 Jul 2020 08:31:32 -0400 Subject: [PATCH] Create go-test.yml --- .github/workflows/go-test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..b6a4b9d --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,29 @@ +name: Build and Test +on: + push: + tags: + - v* + branches: + - master + pull_request: +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.14 + + - name: Check out code + uses: actions/checkout@v1 + + - name: Run Unit tests. + run: go test -short -coverprofile cover.out -covermode=atomic ${PKG_LIST} && cat cover.out >> coverage.txt + + - name: Upload Coverage report to CodeCov + uses: codecov/codecov-action@v1.0.0 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage.txt