mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 19:02:58 +00:00
## Summary This PR introduces a `HeaderProvider` which is called for all remote HTTP calls to get the latest headers to inject. This is useful for features like adding the latest auth tokens where the header provider can auto-refresh tokens internally and each request always set the refreshed token. --------- Co-authored-by: Claude <noreply@anthropic.com>
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: Documentation Code Testing
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- docs/**
|
|
- .github/workflows/docs_test.yml
|
|
pull_request:
|
|
paths:
|
|
- docs/**
|
|
- .github/workflows/docs_test.yml
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
# Disable full debug symbol generation to speed up CI build and keep memory down
|
|
# "1" means line tables only, which is useful for panic tracebacks.
|
|
RUSTFLAGS: "-C debuginfo=1 -C target-cpu=haswell -C target-feature=+f16c,+avx2,+fma"
|
|
RUST_BACKTRACE: "1"
|
|
|
|
jobs:
|
|
test-python:
|
|
name: Test doc python code
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Print CPU capabilities
|
|
run: cat /proc/cpuinfo
|
|
- name: Install protobuf
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- name: Install dependecies needed for ubuntu
|
|
run: |
|
|
sudo apt install -y libssl-dev
|
|
rustup update && rustup default
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.11
|
|
cache: "pip"
|
|
cache-dependency-path: "docs/test/requirements.txt"
|
|
- name: Rust cache
|
|
uses: swatinem/rust-cache@v2
|
|
- name: Build Python
|
|
working-directory: docs/test
|
|
timeout-minutes: 60
|
|
run:
|
|
python -m pip install --extra-index-url https://pypi.fury.io/lancedb/ -r requirements.txt
|
|
- name: Create test files
|
|
run: |
|
|
cd docs/test
|
|
python md_testing.py
|
|
- name: Test
|
|
run: |
|
|
cd docs/test/python
|
|
for d in *; do cd "$d"; echo "$d".py; python "$d".py; cd ..; done
|