Skip to content

Merge pull request #51 from vince-riv/fix/server-config #79

Merge pull request #51 from vince-riv/fix/server-config

Merge pull request #51 from vince-riv/fix/server-config #79

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 ./...