mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
feat: add golangci workflow with some linters (#2957)
This implements the golangci-lint workflow to new PRs. It includes a limited number of enabled linters including: - errcheck - errname - gofmt - gofumpt - gosimple - misspell Signed-off-by: mikeee <hey@mike.ee> Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
@@ -26,6 +26,29 @@ jobs:
|
||||
run: |
|
||||
echo "::warning::Feature branch does not contain any changes to the website."
|
||||
|
||||
lint_go:
|
||||
name: Run Go Linters
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.21"
|
||||
|
||||
- name: Update go modules
|
||||
working-directory: ./v2
|
||||
run: go mod tidy
|
||||
|
||||
- name: Run Linter
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.54
|
||||
working-directory: ./v2
|
||||
args: --timeout=10m0s --config ./.golangci.yml
|
||||
|
||||
test_go:
|
||||
name: Run Go Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
Reference in New Issue
Block a user