Skip to content

.github: Bump actions/checkout from 3.6.0 to 4.0.0 #247

.github: Bump actions/checkout from 3.6.0 to 4.0.0

.github: Bump actions/checkout from 3.6.0 to 4.0.0 #247

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.19', '1.20']
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13]
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@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Check formatting
if: ${{ matrix.go-version == '1.20' && matrix.os == 'ubuntu-22.04' }}
run: diff -u <(echo -n) <(gofmt -d .)
- name: Check Go modules
if: ${{ matrix.go-version == '1.20' && 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 ./...