Skip to content

Merge pull request #37 from vince-riv/chore/dep-update #57

Merge pull request #37 from vince-riv/chore/dep-update

Merge pull request #37 from vince-riv/chore/dep-update #57

Workflow file for this run

---
name: Go
on:
push:
branches: ["main"]
paths:
- '**/**.go'
- 'go.mod'
- 'go.sum'
- '**/_testdata/**'
- '.github/workflows/go.yml'
pull_request:
branches: ["main"]
paths:
- '**/**.go'
- 'go.mod'
- 'go.sum'
- '**/_testdata/**'
- '.github/workflows/go.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Build
run: go build -v ./...
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Format
run: go fmt ./...
lint:
# Only lint on PRs; it's not as useful on pushes to main
if: github.event_name == 'pull_request'
# Disable Go 1.11 modules when running per:
# https://github.com/golangci/golangci-lint/issues/395#issuecomment-922153131
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go for golangci-lint
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: false
env:
GO111MODULE: "off"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
only-new-issues: true
env:
GO111MODULE: "off"
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Test
run: go test -v ./...