Added a dedicated stage for tests and lints #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint & Test | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
env: | |
GO_VERSION: "1.22" | |
jobs: | |
release: | |
runs-on: personal | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Check & format go.mod | |
run: go mod tidy | |
# Run linter and tests | |
- name: Check GoReleaser requirements | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: healthcheck | |
- name: Validate .goreleaser.yaml | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: check |