Skip to content

Merge pull request #12 from sudo-bmitch/pr-fuzz-test #24

Merge pull request #12 from sudo-bmitch/pr-fuzz-test

Merge pull request #12 from sudo-bmitch/pr-fuzz-test #24

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ '**' ]
permissions:
contents: read
jobs:
build:
name: Test and Lint
runs-on: ubuntu-latest
strategy:
matrix:
gover: ['go.mod', 'oldstable', 'stable']
env:
# do not automatically upgrade go to a different version: https://go.dev/doc/toolchain
GOTOOLCHAIN: "local"
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Set up Go ${{ matrix.gover }}"
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ matrix.go != 'go.mod' && matrix.go || null }}
go-version-file: ${{ matrix.go == 'go.mod' && 'go.mod' || null }}
check-latest: true
id: go
- name: Verify go fmt
run: test -z "$(go fmt ./...)"
- name: Verify go vet
run: test -z "$(go vet ./...)"
- name: Test
run: make test
- name: Linting
if: matrix.gover == 'stable'
run: make lint