Skip to content

Upgrade to DBR 18 LTS, enforce CLI version, and improve CI/CD traceab… #136

Upgrade to DBR 18 LTS, enforce CLI version, and improve CI/CD traceab…

Upgrade to DBR 18 LTS, enforce CLI version, and improve CI/CD traceab… #136

Workflow file for this run

name: CI pipeline
on:
push:
branches:
- '**'
tags-ignore:
- 'v*' # this tag type is used for release pipelines
paths-ignore:
- 'README.md'
- 'docs/**'
jobs:
ci-pipeline:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.8"
- name: Install dependencies
run: |
make sync
- name: Run pytest and coverage (unit tests)
run: |
make test
- name: Install Databricks CLI
uses: databricks/setup-cli@main
- name: Deploy on staging
run: |
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
PR_NUMBER="${{ github.event.pull_request.number }}"
DEVELOPER="${{ github.actor }}"
uv run python ./scripts/generate_template_workflow.py staging --serverless \
--branch "$BRANCH_NAME" \
--developer "$DEVELOPER" \
$(if [ -n "$PR_NUMBER" ]; then echo "--pr-number $PR_NUMBER"; fi)
uv run databricks bundle deploy --target staging
- name: Run on staging (integration tests)
run: |
make run env=staging
- name: Deploy on prod
run: |
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
PR_NUMBER="${{ github.event.pull_request.number }}"
DEVELOPER="${{ github.actor }}"
uv run python ./scripts/generate_template_workflow.py prod --serverless \
--branch "$BRANCH_NAME" \
--developer "$DEVELOPER" \
$(if [ -n "$PR_NUMBER" ]; then echo "--pr-number $PR_NUMBER"; fi)
uv run databricks bundle deploy --target prod