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.
This commit is contained in:
Denis Bilenko 2025-01-07 18:10:49 +01:00 committed by GitHub
parent e6552231eb
commit 43420d01ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -13,12 +13,26 @@ on:
# seed the build cache. # seed the build cache.
branches: branches:
- main - main
schedule:
- cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily
env: env:
GOTESTSUM_FORMAT: github-actions GOTESTSUM_FORMAT: github-actions
jobs: 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: tests:
needs: cleanups
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
@ -61,6 +75,7 @@ jobs:
run: make test run: make test
golangci: golangci:
needs: cleanups
name: lint name: lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -86,6 +101,7 @@ jobs:
args: --timeout=15m args: --timeout=15m
validate-bundle-schema: validate-bundle-schema:
needs: cleanups
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps: