Files
dlt/.github/workflows/test_hub.yml
ivasio 99207237fe docs: add runtime docs to CLI reference (#3445)
* bumps to version 1.20.0

* update the hub reference docs, add CI check

* use dependency specifier in hub for plugin version check

* minimum dlt runtime cli check

* rollaback to old fsspec min version

* fixes test_hub ci workflow

* fixes flaky test

* bumps hub extra

* updates cli docs linting

* fixes docs lock

---------

Co-authored-by: Marcin Rudolf <rudolfix@rudolfix.org>
Co-authored-by: ivasio <ivan@dlthub.com>
2025-12-09 17:30:53 +01:00

118 lines
3.5 KiB
YAML

name: hub | dlthub features
#
# dlthub smoke tests against the nightly build.
#
on:
workflow_call:
workflow_dispatch:
env:
RUNTIME__LOG_LEVEL: ERROR
jobs:
run_hub_features:
name: test
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
dlthub_dep: ["", "https://dlt-packages.fra1.digitaloceanspaces.com/dlthub/dlthub-0.0.0+nightly-py3-none-any.whl"]
# Test all python versions on ubuntu only
exclude:
- os: "macos-latest"
python-version: "3.10"
- os: "macos-latest"
python-version: "3.12"
- os: "macos-latest"
python-version: "3.13"
- os: "windows-latest"
python-version: "3.10"
- os: "windows-latest"
python-version: "3.12"
- os: "windows-latest"
python-version: "3.13"
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
enable-cache: true
- name: Install min dependencies
run: uv sync
- name: run import tests
run: uv run pytest tests/hub/test_plugin_import.py
# NOTE: needed for mssql source tests in plus
- name: Install ODBC driver for SQL Server
run: |
sudo ACCEPT_EULA=Y apt-get install --yes msodbcsql18
if: matrix.os == 'ubuntu-latest'
# still does not work in mac
# - name: Install ODBC driver for SQL Server (macOS)
# if: matrix.os == 'macos-latest'
# env:
# HOMEBREW_NONINTERACTIVE: 1
# HOMEBREW_NO_AUTO_UPDATE: 1
# HOMEBREW_NO_ANALYTICS: 1
# HOMEBREW_NO_INSTALL_CLEANUP: 1
# run: |
# brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
# printf "YES\n" | brew install msodbcsql18
# # quick diagnostics (do not fail the build if unavailable)
# odbcinst -j || true
# odbcinst -q -d || true
- name: Install all dependencies
run: make dev-hub
- name: Install dlthub
if: matrix.dlthub_dep != ''
run: uv run pip install --upgrade --force-reinstall --pre --no-cache-dir ${{ matrix.dlthub_dep }}
- name: Run tests
run: pytest tests/hub
# if: matrix.os != 'macos-latest'
- name: Test runtime client
run: |
mkdir .dlt && touch .dlt/.workspace
dlt runtime --help
# DISABLED: because docs rendering happens in non-deterministic order (of plugin discovery)
# must be fixed
# - name: Check that dlthub cli docs are up to date
# run: cd docs/tools/dlthub_cli && make check-cli-docs
# if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' }}
matrix_job_required_check:
name: hub | dlthub features tests
needs: run_hub_features
runs-on: ubuntu-latest
if: always()
steps:
- name: Check matrix job results
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "One or more matrix job tests failed or were cancelled. You may need to re-run them." && exit 1