Skip to content

Commit

Permalink
Add github golang lint CI pipeline (#899)
Browse files Browse the repository at this point in the history
* Add github golang lint CI pipeline

* add dependabot config

* use go version from go.mod

* run linter on linux only

* restrict pipeline permissions

---------

Co-authored-by: Ahmed Elsabbahy <[email protected]>
  • Loading branch information
dklimpel and aelsabbahy authored May 22, 2024
1 parent 784c3c2 commit 7ca5459
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ updates:
- "aelsabbahy"
open-pull-requests-limit: 0

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"

- package-ecosystem: "pip"
directory: "/docs"
schedule:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Golang ci
on:
# don't build any branch other than master (and prs) when git pushed
pull_request: {}
push:
branches:
- master
- "/^v\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"

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-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true

0 comments on commit 7ca5459

Please sign in to comment.