From fc20012ef014c9de899ece5c4ec4d01e480bb506 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Wed, 13 Mar 2024 16:17:40 +0300 Subject: [PATCH] Add a "Disk Cleanup" step as the first step in the lint job - Limit concurrency to 3 in the full linting phase. - Always run the analysis cache building phase even if there's cache hit. Signed-off-by: Alper Rifat Ulucinar --- .github/workflows/ci.yml | 12 +++++++++++- .golangci.yml | 1 + Makefile | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8702c8e06c..788a38059c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,16 @@ jobs: if: needs.detect-noop.outputs.noop != 'true' steps: + - name: Cleanup Disk + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + with: + android: true + dotnet: true + haskell: true + tool-cache: true + large-packages: false + swap-storage: false + - name: Checkout uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 with: @@ -87,6 +97,6 @@ jobs: - name: Lint env: GOLANGCI_LINT_CACHE: ${{ steps.go_cache.outputs.analysis_cache }} - SKIP_LINTER_ANALYSIS: ${{ steps.cache-analysis.outputs.cache-hit }} + SKIP_LINTER_ANALYSIS: false RUN_BUILDTAGGER: true run: make lint \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index 053c0b5a69..1bf004fbd1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,7 @@ run: timeout: 60m show-stats: true + concurrency: 3 output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" diff --git a/Makefile b/Makefile index a824cf93bb..8df11517af 100644 --- a/Makefile +++ b/Makefile @@ -357,7 +357,7 @@ build-lint-cache: $(GOLANGCILINT) @# minimum. @(BUILDTAGGER_DOWNLOAD_URL=$(BUILDTAGGER_DOWNLOAD_URL) ./scripts/tag.sh && \ (([[ "${SKIP_LINTER_ANALYSIS}" == "true" ]] && $(OK) "Skipping analysis cache build phase because it's already been populated") && \ - [[ "${SKIP_LINTER_ANALYSIS}" == "true" ]] || $(GOLANGCILINT) run -v --build-tags account,configregistry,configprovider,linter_run -v --concurrency 3 --disable-all --exclude '.*')) || $(FAIL) + [[ "${SKIP_LINTER_ANALYSIS}" == "true" ]] || $(GOLANGCILINT) run -v --build-tags account,configregistry,configprovider,linter_run -v --disable-all --exclude '.*')) || $(FAIL) @$(OK) Running golangci-lint with the analysis cache building phase. delete-build-tags: