You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
name: Pull Request
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.18.x
|
|
- uses: dominikh/staticcheck-action@v1.2.0
|
|
with:
|
|
version: "2022.1.1"
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go-version:
|
|
- 1.18.x
|
|
platform:
|
|
- macos-latest
|
|
- windows-latest
|
|
- ubuntu-latest
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.18.x
|
|
- name: Run tests
|
|
run: |
|
|
go test -v -coverprofile coverage.out -covermode atomic ./...
|
|
- name: Publish coverage
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.18.x
|
|
- name: Build
|
|
uses: goreleaser/goreleaser-action@v3
|
|
with:
|
|
version: v0.155.0
|
|
args: --snapshot --skip-publish --debug
|