(ci) Add lint workflow (#95)

* (ci) Add lint workflow, update build workflow actions

* (ci) Fixed golangci-lint version

oops I accidentally confused the golintci-lint and go versions

* (ci) Testing exclusions

* Update .golangci.yml

* Update .golangci.yml
This commit is contained in:
Campbell 2026-04-05 21:53:04 -04:00 committed by GitHub
parent f9d561bd22
commit 8260fcf584
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 5 deletions

View File

@ -11,13 +11,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Install dependencies
run: go mod download
- uses: goreleaser/goreleaser-action@v5
- uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: latest
@ -32,7 +32,7 @@ jobs:
id: short-sha
run: echo "SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wfc-server-${{ steps.short-sha.outputs.SHA }}
path: ./dist/*/*
path: ./dist/*/*

20
.github/workflows/golangci-lint.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: golangci-lint
on:
[push, pull_request]
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11

13
.golangci.yml Normal file
View File

@ -0,0 +1,13 @@
version: "2"
linters:
exclusions:
paths:
- "nhttp/ascii.go"
- "nhttp/buffer.go"
- "nhttp/chunked.go"
- "nhttp/errors.go"
- "nhttp/handler.go"
- "nhttp/request.go"
- "nhttp/response.go"
- "nhttp/server.go"
- "nhttp/transfer.go"