adguardhome-sync/.github/workflows/go.yml
2021-04-11 10:51:24 +02:00

59 lines
1.3 KiB
YAML

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.36
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Test
run: make test
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
test-release:
name: test release
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --skip-publish --snapshot --rm-dist