.github: Bump actions/setup-go from 4.0.1 to 4.1.0 #169
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
go-version: ['1.18', '1.19', '1.20'] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check out code | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Check formatting | |
if: ${{ matrix.go-version == '1.20' && matrix.os == 'ubuntu-latest' }} | |
run: diff -u <(echo -n) <(gofmt -d .) | |
- name: Check Go modules | |
if: ${{ matrix.go-version == '1.20' && 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 ./... |