devie #15
Workflow file for this run
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: Dev Lint | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Run only on tags' | |
required: true | |
default: 'true' | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
cache: true | |
- name: Install requirements | |
id: install-lint-requirements | |
run: | | |
go mod download | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest | |
- name: Lint | |
id: lint | |
run: | | |
golangci-lint run | |
- name: Vet | |
id: vet | |
run: | | |
sqlc vet | |
go vet ./... | |
- name: Run Revive Action by pulling pre-built image | |
uses: docker://morphy/revive-action:v2 | |
with: | |
config: .revive.toml |