Issue #15 adding lint to CI Pipeline. (#325)

Added golangci-lint run check to repo. Currently enables only the defaults.

https://golangci-lint.run/usage/linters
This commit is contained in:
Danny 2022-07-13 18:59:58 -04:00 committed by GitHub
parent c1c9cfe118
commit 76a5d6bba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 1 deletions

View File

@ -54,4 +54,4 @@ jobs:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
TENANT_ID: ${{ secrets.TENANT_ID }}
run: go test ./...
run: go test ./...

33
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Linting of Source Code
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Linting:
environment: Testing
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout src code
uses: actions/checkout@v3
- name: Golang Setup
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Download package dependencies
run: go mod download
- name: Go Lint
uses: golangci/golangci-lint-action@v3.2.0
with:
version: v1.45.2
working-directory: ./src
args: --timeout=15m
skip-pkg-cache: true