From af5768432c431f1696628a37d0575789a3778e24 Mon Sep 17 00:00:00 2001 From: "SKh." Date: Tue, 15 Oct 2024 11:39:05 -0400 Subject: [PATCH] chore: increase timeout for golangci-lint --- .github/workflows/ci.yml | 10 ---------- .github/workflows/go-lint.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/go-lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8141809d7..67f440d53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,6 @@ on: - main pull_request: -env: - GOLANGCI_LINT_VERSION: v1.61.0 - jobs: build-lint-test: name: CI @@ -32,17 +29,10 @@ jobs: sudo apt update sudo apt install -y gcc - - name: Setup CI Linter - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{env.GOLANGCI_LINT_VERSION}} - - name: Build run: | mage -v build - - name: Lint - run: | - mage -v lint - - name: Test run: | CGO_ENABLED=1 mage -v testRace diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml new file mode 100644 index 000000000..72ddf079e --- /dev/null +++ b/.github/workflows/go-lint.yml @@ -0,0 +1,28 @@ +name: Lint Go +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +env: + GOLANGCI_LINT_VERSION: v1.61.0 +jobs: + lint-go: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: ${{env.GOLANGCI_LINT_VERSION}} + args: | + "./..." --timeout=7m + skip-cache: true + install-mode: binary