1
0
mirror of https://github.com/google/gops.git synced 2024-11-24 08:22:25 +02:00
gops/.github/workflows/test.yml
Tobias Klauser dea1b030f0 Bump minimum Go version to 1.18, test on latest supported releases
Bump the minimum supported Go version to 1.18 in go.mod. Also make sure
CI is testing against the latest two versions supported upstream,
currently 1.21 and 1.22.
2024-05-03 18:47:35 +02:00

35 lines
753 B
YAML

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
# Minimum supported version (1.18) and the latest two
go-version: ['1.18', '1.21', '1.22']
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Check formatting
if: matrix.go-version == '1.22' && matrix.platform == 'ubuntu-latest'
run: diff -u <(echo -n) <(go fmt $(go list ./...))
- name: Run unit tests
run: go test -race -v ./...