From c58229834679860a7475e2eac657611220059ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbjo=CC=88rn=20Einarsson?= Date: Mon, 4 Nov 2024 22:20:25 +0100 Subject: [PATCH] test: add goveralls Github action --- .github/workflows/coverage.yml | 22 ++++++++++++++++++++++ .github/workflows/go.yml | 5 +++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..87213d3e --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,22 @@ +name: Coverage + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: 1.22 + - name: Checkout + uses: actions/checkout@v4 + - run: go test -v -coverprofile=profile.cov ./... + - uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3ae06241..b124f22f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,12 +15,12 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Go dependencies run: go mod download @@ -32,3 +32,4 @@ jobs: - name: Test run: go test -v ./... +