posts-go/.github/workflows/go.yml

37 lines
703 B
YAML
Raw Normal View History

2022-07-10 11:03:43 +00:00
name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.18"
check-latest: true
cache: true
- run: go test -race -failfast ./...
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.18"
check-latest: true
cache: true
- run: go build .