2022-07-04 05:35:47 +00:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-31 10:33:56 +00:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
2022-07-04 05:35:47 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-31 10:33:56 +00:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-07-04 05:35:47 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 05:42:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 05:29:36 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2022-07-04 05:35:47 +00:00
|
|
|
with:
|
2023-03-31 10:33:56 +00:00
|
|
|
go-version: "stable"
|
2022-07-04 05:35:47 +00:00
|
|
|
- run: go test -race -coverprofile=coverage.out ./...
|
|
|
|
- uses: codecov/codecov-action@v3
|
|
|
|
with:
|
|
|
|
files: coverage.out
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
steps:
|
2023-09-05 05:42:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 05:29:36 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2022-07-04 05:35:47 +00:00
|
|
|
with:
|
2023-03-31 10:33:56 +00:00
|
|
|
go-version: "stable"
|
2022-07-04 05:35:47 +00:00
|
|
|
- run: go build ./cmd/dot
|
|
|
|
golangci-lint:
|
|
|
|
name: golangci-lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 05:42:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 05:29:36 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2022-07-04 05:35:47 +00:00
|
|
|
with:
|
2023-03-31 10:33:56 +00:00
|
|
|
go-version: "stable"
|
2022-07-04 05:35:47 +00:00
|
|
|
- uses: golangci/golangci-lint-action@v3
|
|
|
|
with:
|
|
|
|
version: latest
|