Skip to content

General improvement

General improvement #4

Workflow file for this run

name: Test
on:
push:
branches: [ "master" ]
tags: [ "v*" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Format
run: gofmt -l . && test -z "$(gofmt -l .)"
- name: Build
run: go build -v ./...
- name: Test
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Vet
run: go vet -v ./...
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest