Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Run Tests
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@v3
with:
go-version: '1.15'
- name: Test
run: go mod tidy && go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.TOKEN_GITHUB }}
run: goveralls -coverprofile=covprofile