Use matrix strategy for building on multiple platforms

This commit is contained in:
ayntgl 2022-01-23 22:50:49 +04:00
parent 5e791f7f1a
commit 3917bbe234
2 changed files with 12 additions and 2 deletions

View file

@ -3,17 +3,24 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '^1.17'
- name: Format
run: gofmt -d -e -s .
run: make fmt
- name: Build
run: make build
- name: Test
run: make test

View file

@ -4,5 +4,8 @@ build:
test:
go test -v ./...
fmt:
gofmt -d -e -s .
clean:
go clean