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

45 lines
818 B
YAML
Raw Normal View History

2022-07-10 11:03:43 +00:00
name: Go
on:
push:
branches:
- main
2023-03-30 09:44:51 +00:00
paths:
- "**.go"
- "go.mod"
- "go.sum"
2022-07-10 11:03:43 +00:00
pull_request:
branches:
- main
2023-03-30 09:44:51 +00:00
paths:
- "**.go"
- "go.mod"
- "go.sum"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2022-07-10 11:03:43 +00:00
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
2022-07-10 11:03:43 +00:00
with:
2023-03-30 09:44:51 +00:00
go-version: "stable"
2022-07-10 11:03:43 +00:00
- 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@v4
- uses: actions/setup-go@v5
2022-07-10 11:03:43 +00:00
with:
2023-03-30 09:44:51 +00:00
go-version: "stable"
2022-07-10 11:03:43 +00:00
- run: go build .