.github/workflows/tests.yml
name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build
run: go build -v ./...
- name: Test
run: go test -race -covermode=atomic -coverprofile=coverage.out -v ./...
- name: Upload coverage to codeclimate
uses: paambaati/codeclimate-action@v3.0.0
continue-on-error: true
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
with:
coverageCommand: ''
prefix: 'github.com/brokeyourbike/melodist'
coverageLocations: ./coverage.out:gocov