From 76a5d6bba3ddf3dbb68054dccef999b674654172 Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 13 Jul 2022 18:59:58 -0400 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f00e63f5..562cebebd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,4 +54,4 @@ jobs: CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} TENANT_ID: ${{ secrets.TENANT_ID }} - run: go test ./... \ No newline at end of file + run: go test ./... diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..b8f417c1c --- /dev/null +++ b/.github/workflows/lint.yml @@ -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