changeloguru/.github/workflows/go.yml

58 lines
1.1 KiB
YAML
Raw Normal View History

name: Go
on:
push:
branches:
- main
paths:
- "**.go"
- "go.mod"
- "go.sum"
pull_request:
branches:
- main
paths:
- "**.go"
- "go.mod"
- "go.sum"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
2021-11-06 07:05:55 +00:00
with:
2023-03-28 17:38:23 +00:00
go-version: "stable"
- run: go test -race -failfast ./...
2021-03-29 07:26:44 +00:00
build:
2021-03-18 10:15:20 +00:00
name: Build
2021-03-29 07:26:44 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
2023-03-28 17:38:23 +00:00
go-version: "stable"
- run: go build ./cmd/changeloguru
2021-11-06 07:05:55 +00:00
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
2022-07-03 18:12:00 +00:00
with:
2023-03-28 17:38:23 +00:00
go-version: "stable"
2022-07-03 18:12:00 +00:00
- uses: golangci/golangci-lint-action@v3
2021-11-06 07:05:55 +00:00
with:
version: latest