2020-11-09 10:30:22 +00:00
|
|
|
name: Go
|
|
|
|
|
2021-04-11 09:17:55 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2020-11-09 10:30:22 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-03 18:12:00 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
2021-11-06 07:05:55 +00:00
|
|
|
with:
|
2022-08-15 18:17:44 +00:00
|
|
|
go-version: "1.19"
|
2022-07-03 18:12:00 +00:00
|
|
|
check-latest: true
|
|
|
|
cache: true
|
2021-08-20 18:02:43 +00:00
|
|
|
- run: go test -race -coverprofile=coverage.out ./...
|
2022-07-03 18:12:00 +00:00
|
|
|
- uses: codecov/codecov-action@v3
|
2021-08-20 18:02:43 +00:00
|
|
|
with:
|
|
|
|
files: coverage.out
|
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:
|
2022-07-03 18:12:00 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
2020-11-23 10:45:25 +00:00
|
|
|
with:
|
2022-08-15 18:17:44 +00:00
|
|
|
go-version: "1.19"
|
2022-07-03 18:12:00 +00:00
|
|
|
check-latest: true
|
|
|
|
cache: true
|
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:
|
2022-07-03 18:12:00 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
2022-08-15 18:17:44 +00:00
|
|
|
go-version: "1.19"
|
2022-07-03 18:12:00 +00:00
|
|
|
check-latest: true
|
|
|
|
cache: true
|
|
|
|
- uses: golangci/golangci-lint-action@v3
|
2021-11-06 07:05:55 +00:00
|
|
|
with:
|
|
|
|
version: latest
|