databricks-cli/.github/workflows/python_push.yml

78 lines
2.0 KiB
YAML

name: python build
on:
pull_request:
types: [opened, synchronize]
paths:
- experimental/python/**
merge_group:
types: [checks_requested]
paths:
- experimental/python/**
push:
# Always run on push to main. The build cache can only be reused
# if it was saved by a run from the repository's default branch.
# The run result will be identical to that from the merge queue
# because the commit is identical, yet we need to perform it to
# seed the build cache.
branches:
- main
jobs:
python_tests:
name: tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pyVersion: [ '3.10', '3.11', '3.12', '3.13' ]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
with:
python-version: ${{ matrix.pyVersion }}
version: "0.6.5"
- name: Run tests
working-directory: experimental/python
run: make test
python_linters:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
with:
version: "0.6.5"
- name: Run lint
working-directory: experimental/python
run: make lint
python_docs:
name: docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
with:
version: "0.6.5"
- name: Run docs
working-directory: experimental/python
run: make docs