Skip to content

Tests

Tests #31

Workflow file for this run

# 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:
strategy:
matrix:
os:
- macos-latest
- ubuntu-24.04
runs-on: ${{matrix.os}}
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 with coverage
run: go test -p 1 -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-24.04'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true