Skip to content

.github: Bump actions/checkout from 4.1.4 to 4.1.5 #307

.github: Bump actions/checkout from 4.1.4 to 4.1.5

.github: Bump actions/checkout from 4.1.4 to 4.1.5 #307

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
strategy:
matrix:
# Oldest supported version is 1.18, plus the latest two releases.
go-version: ['1.18', '1.21', '1.22']
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, macos-14, windows-2019, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- name: Check formatting
if: ${{ matrix.go-version == '1.22' && matrix.os == 'ubuntu-22.04' }}
run: diff -u <(echo -n) <(gofmt -d .)
- name: Check Go modules
if: ${{ matrix.go-version == '1.22' && matrix.os == 'ubuntu-22.04' }}
run: |
go mod tidy
git diff --exit-code
- name: Build (cross-compile)
if: matrix.os == 'ubuntu-22.04'
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 ./...