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