setup linter in github actions

This commit is contained in:
Gabriel Augendre 2024-03-27 22:11:46 +01:00
parent 08021fa72a
commit fe11a610f8
2 changed files with 29 additions and 2 deletions

View file

@ -14,10 +14,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.21'

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

@ -0,0 +1,27 @@
name: golangci-lint
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest