Skip to content

gha: extend matrix to include Windows and macOS, and lint on all #84

gha: extend matrix to include Windows and macOS, and lint on all

gha: extend matrix to include Windows and macOS, and lint on all #84

Workflow file for this run

name: CI
on: [push, pull_request]
# Default to 'contents: read', which grants actions to read commits. Any
# permission not included is implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ${{ matrix.platform }}
timeout-minutes: 20 # guardrails timeout
strategy:
fail-fast: false
matrix:
# Oldest supported + currently supported Go versions
go: ["1.12.x", "oldstable", "stable"]
platform: [ubuntu-latest, windows-latest, macos-latest]
exclude:
# go1.12 is not available for windows and macos on GitHub actions.
- go: "1.12.x"
platform: windows-latest
- go: "1.12.x"
platform: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ matrix.go }}
- name: Test
# Cannot enable shuffle for now because some tests rely on global state and order
# run: go test -race -v -shuffle=on ./...
run: go test -race -v ./...
- name: Lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.4