From 04a8d10f753185dd407a2c646ceaebbf568e3749 Mon Sep 17 00:00:00 2001 From: Keepers Date: Wed, 28 Sep 2022 18:32:22 -0600 Subject: [PATCH] address golang ci modfile discovery (#967) ## Description Github cache imposes a 10gb limit, after which cache entries will automatically get evictions (LRU policy). Various recent queries have pinned our current cache size at 14-19 gb. The golangci-lint cache alone accounts for 5-9 gb of that usage. Meanwhile, it takes a shorter time for that package to download missing modules than it does to run our tests. This change shuts down the golangci cache in hopes that it improves our branch caching retention. ## Type of change - [x] :computer: CI/Deployment ## Issue(s) * #790 ## Test Plan - [x] :green_heart: E2E --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dcc6ef3d..d62889178 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,9 @@ jobs: needs: precheck environment: Testing runs-on: ubuntu-latest + defaults: + run: + working-directory: src steps: - uses: actions/checkout@v3 @@ -91,7 +94,7 @@ jobs: # Upload the original go test log as an artifact for later review. - name: Upload test log - if: needs.precheck.outputs.fileschanged == 'true' + if: failure() && needs.precheck.outputs.fileschanged == 'true' uses: actions/upload-artifact@v3 with: name: test-log @@ -120,10 +123,11 @@ jobs: - name: Go Lint if: needs.precheck.outputs.fileschanged == 'true' - uses: golangci/golangci-lint-action@v3.2.0 + uses: golangci/golangci-lint-action@v3 with: version: v1.45.2 - working-directory: ./src + working-directory: src + skip-cache: true # check licenses - name: Get go-licenses