From 43420d01adf5af7b3ef7368e2ace78bdb7325601 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 7 Jan 2025 18:10:49 +0100 Subject: [PATCH] Run push.yml periodically with clean cache (#2092) This ensures that our build still works with clean cache and also populates build/test cache, speeding up test runs. --- .github/workflows/push.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index db214d67f..b71b23c4b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,12 +13,26 @@ on: # seed the build cache. branches: - main + schedule: + - cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily env: GOTESTSUM_FORMAT: github-actions jobs: + cleanups: + runs-on: + group: databricks-deco-testing-runner-group + labels: ubuntu-latest-deco + steps: + - name: Clean up cache if running on schedule + if: ${{ github.event_name == 'schedule' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh cache delete --all --repo databricks/cli || true + tests: + needs: cleanups runs-on: ${{ matrix.os }} strategy: @@ -61,6 +75,7 @@ jobs: run: make test golangci: + needs: cleanups name: lint runs-on: ubuntu-latest steps: @@ -86,6 +101,7 @@ jobs: args: --timeout=15m validate-bundle-schema: + needs: cleanups runs-on: ubuntu-latest steps: