ci: verify uv.lock is current before sync #266
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI pipeline | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - 'v*' # this tag type is used for release pipelines | |
| paths-ignore: | |
| - 'README.md' | |
| - 'CLAUDE.md' | |
| - 'assets/**' | |
| - 'specs/**' # includes specs/CHANGELOG.md | |
| # Manual trigger for re-running CI without a new commit (e.g. after a transient | |
| # GitHub Actions hiccup that silently drops a push event): | |
| # gh workflow run "CI pipeline" --ref <branch> | |
| workflow_dispatch: | |
| # Don't let two pushes on the same branch race each other through the deploy step. | |
| concurrency: | |
| group: deploy-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }} | |
| DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }} | |
| TEMPLATE_ALERT_EMAILS: ${{ secrets.TEMPLATE_ALERT_EMAILS }} | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v9 | |
| with: | |
| version: "0.11.31" | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| # Fail if a PR edited pyproject.toml without re-running `uv lock`. `make sync` | |
| # would silently re-resolve and discard the update in CI's throwaway checkout, | |
| # leaving the committed uv.lock stale. This read-only check keeps them in sync. | |
| - name: Verify lockfile is current | |
| run: uv lock --check | |
| - name: Install dependencies | |
| run: make sync | |
| - name: Unit tests | |
| run: make unit-test | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: reports/coverage/ | |
| retention-days: 14 | |
| # Pin the CLI to a tagged release so an upstream change can't silently break CI. | |
| - name: Install Databricks CLI | |
| uses: databricks/setup-cli@v1.9.0 | |
| - name: Deploy on staging | |
| run: make deploy env=staging | |
| - name: Run integration tests on staging | |
| run: make run env=staging | |
| - name: Deploy on prod | |
| if: github.ref == 'refs/heads/main' | |
| run: make deploy env=prod |