From 0e8228d6f69dbe19cd5e8516413336479c66348d Mon Sep 17 00:00:00 2001 From: Divij Sharma Date: Thu, 11 Jan 2024 18:05:58 +0530 Subject: [PATCH] feat(ci): Github Workflow for Golang static checks and linting Signed-off-by: Divij Sharma --- .github/workflows/golangci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/golangci.yml diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml new file mode 100644 index 0000000..23a75ea --- /dev/null +++ b/.github/workflows/golangci.yml @@ -0,0 +1,34 @@ +# SPDX-FileCopyrightText: 2024 Divij Sharma +# SPDX-License-Identifier: GPL-2.0-only + +name: Static Checks and Linting + +concurrency: + group: lint-${{ github.head_ref }} + cancel-in-progress: true + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + golangci-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + check-latest: true + cache: true + + - name: lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.55 +