Skip to content

Update workflows

Update workflows #4

name: Test and coverage report
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.20', '1.21' ]
name: Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build ./...
- name: Test
run: go test -v -coverprofile=./coverage.out ./...
- name: Codacy Coverage Reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.out
language: go
force-coverage-parser: go