Skip to content

.github: Bump actions/setup-go from 4.1.0 to 5.0.0 #191

.github: Bump actions/setup-go from 4.1.0 to 5.0.0

.github: Bump actions/setup-go from 4.1.0 to 5.0.0 #191

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
strategy:
matrix:
go-version: ['1.18', '1.20', '1.21']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Check formatting
if: ${{ matrix.go-version == '1.21' && matrix.os == 'ubuntu-latest' }}
run: diff -u <(echo -n) <(gofmt -d .)
- name: Check Go modules
if: ${{ matrix.go-version == '1.21' && matrix.os == 'ubuntu-latest' }}
run: |
go mod tidy
git diff --exit-code
- name: Build (cross-compile)
if: matrix.os == 'ubuntu-latest'
run: |
GOOS=darwin go build ./...
GOOS=dragonfly go build ./...
GOOS=freebsd go build ./...
GOOS=linux go build ./...
GOOS=netbsd go build ./...
GOOS=openbsd go build ./...
GOOS=solaris go build ./...
GOOS=windows go build ./...
- name: Test (native)
run: go test -v ./...