Skip to content

Test

Test #5

Workflow file for this run

name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.14', '1.16', '1.18', '1.20.x' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: |
go mod download
- name: Run Unit tests
run: |
go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
if : ${{ matrix.go-version == '1.20.x' }}
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
if : ${{ matrix.go-version == '1.20.x' }}
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github