Skip to content

.github: bump actions/checkout from 4.2.2 to 5.0.0 #257

.github: bump actions/checkout from 4.2.2 to 5.0.0

.github: bump actions/checkout from 4.2.2 to 5.0.0 #257

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
strategy:
matrix:
# Latest two supported releases.
go-version: ['1.23', '1.24']
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14, macos-15, windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.0.2
with:
go-version: ${{ matrix.go-version }}
- name: Check formatting
if: ${{ matrix.go-version == '1.24' && matrix.os == 'ubuntu-24.04' }}
run: diff -u <(echo -n) <(gofmt -d .)
- name: Check Go modules
if: ${{ matrix.go-version == '1.24' && matrix.os == 'ubuntu-24.04' }}
run: |
go mod tidy -diff
- name: Test (native)
run: go test -v ./...
- name: Build (cross-compile)
if: matrix.os == 'ubuntu-24.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 ./...