You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/.github/workflows/go-validate.yml

56 lines
1.3 KiB

name: "Go Validate"
on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on main branch
- 'main'
- 'crt-onboarding' # Used for testing ONLY. Must be removed before merging
pull_request:
paths:
- "**"
jobs:
check-mod-tidy:
runs-on: ubuntu-latest
name: Go Mod Tidy
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- run: go mod tidy
check-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- run: echo "$GITHUB_SHA"
- run: git fetch --all
- run: echo $(git merge-base origin/master $GITHUB_SHA)
- run: make ci-lint
check-fmt:
runs-on: ubuntu-latest
name: Fmt check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- run: make fmt-check
check-generate:
runs-on: ubuntu-latest
name: Generate check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- run: make generate-check