2020-11-09 10:30:22 +00:00
|
|
|
name: Go
|
|
|
|
|
2021-04-11 09:17:55 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-28 17:43:51 +00:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
2021-04-11 09:17:55 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-28 17:43:51 +00:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2020-11-09 10:30:22 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 05:48:05 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 05:07:47 +00:00
|
|
|
- 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]
|
2020-11-23 10:45:25 +00:00
|
|
|
steps:
|
2023-09-05 05:48:05 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 05:07:47 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2020-11-23 10:45:25 +00:00
|
|
|
with:
|
2023-03-28 17:38:23 +00:00
|
|
|
go-version: "stable"
|
2021-05-05 08:18:47 +00:00
|
|
|
- run: go build ./cmd/changeloguru
|
2021-11-06 07:05:55 +00:00
|
|
|
golangci-lint:
|
|
|
|
name: golangci-lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 05:48:05 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-16 07:36:35 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-12-07 05:07:47 +00:00
|
|
|
- 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
|