From d983c31e5272aa14b4f7ca31bc3bb5a50181ebfb Mon Sep 17 00:00:00 2001 From: Robert Lillack Date: Thu, 6 Jun 2024 08:55:26 +0200 Subject: [PATCH] build: Add coverage profile --- .github/workflows/go.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 12f9ac3..a6b8b42 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,28 +1,28 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - name: Go on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.21" - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.21' + - name: Build + run: go build -v ./... - - name: Build - run: go build -v ./... + - name: Test + run: go test -v -coverprofile=profile.cov ./... - - name: Test - run: go test -v ./... + - uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov