# 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, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: "stable"

      - name: Run test with coverage
        run: go test -race -coverprofile=coverage.txt -covermode=atomic

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v3
