Skip to content

Build

Build #36

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: 0 0 * * 1
jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '1.19'
- '1.20'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
if: github.event_name == 'pull_request'
with:
only-new-issues: true
- name: Test
run: go test -v -coverprofile=cover.out ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: cover.out
flag-name: Go-${{ matrix.go }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true