1
0
mirror of https://github.com/google/gops.git synced 2025-02-19 19:59:55 +02:00
Tobias Klauser c5ab645ce5 Use Go 1.17 in CI
Also drop tests for 1.13 and 1.14, these are no longer supported
upstream. Keep 1.12 though as this is the mimimum supported version for
gops.
2021-09-03 09:57:33 +02:00

42 lines
962 B
YAML

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
# Minimum supported version (1.12) and the latest few versions
go-version: [1.12, 1.15, 1.16, 1.17]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Check formatting
if: matrix.go-version == '1.17' && matrix.platform == 'ubuntu-latest'
run: diff -u <(echo -n) <(go fmt $(go list ./...))
- name: Check module vendoring
if: matrix.go-version == '1.17' && matrix.platform == 'ubuntu-latest'
run: |
go mod tidy
go mod vendor
git diff --exit-code || exit 1
- name: Run unit tests
run: go test -v ./...