mirror of
https://github.com/google/gops.git
synced 2024-11-27 08:31:17 +02:00
35 lines
747 B
YAML
35 lines
747 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
# Minimum supported version (1.17) and the latest two
|
|
go-version: [1.17, 1.18, 1.19]
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Check formatting
|
|
if: matrix.go-version == '1.19' && matrix.platform == 'ubuntu-latest'
|
|
run: diff -u <(echo -n) <(go fmt $(go list ./...))
|
|
|
|
- name: Run unit tests
|
|
run: go test -race -v ./...
|