From c7f4f620bad0a7ec39cec5fd10f644bdb5c99550 Mon Sep 17 00:00:00 2001 From: Silvio Ginter Date: Thu, 19 Dec 2024 19:53:42 +0100 Subject: [PATCH] Create go.yml add Github workflow --- .github/workflows/go.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..19b628f --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,33 @@ +# 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" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Go Coverage + # You may pin to the exact commit or the version. + # uses: gwatts/go-coverage-action@2845595538a59d63d1bf55f109c14e104c6f7cb3 + uses: gwatts/go-coverage-action@v2.0.0