changeloguru/.github/workflows/go.yml

55 lines
1.2 KiB
YAML
Raw Normal View History

name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
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@v4
2021-11-06 07:05:55 +00:00
with:
2023-02-08 08:30:56 +00:00
go-version: "1.20"
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]
steps:
2022-07-03 18:12:00 +00:00
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
2023-02-08 08:30:56 +00:00
go-version: "1.20"
2022-07-03 18:12:00 +00:00
check-latest: true
cache: true
- 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
with:
fetch-depth: 0
- uses: actions/setup-go@v4
2022-07-03 18:12:00 +00:00
with:
2023-02-08 08:30:56 +00:00
go-version: "1.20"
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