mirror of
https://github.com/lancedb/lancedb.git
synced 2026-07-01 18:10:41 +00:00
Fixes #3577 ## Problem GitHub Actions is deprecating Node.js 20 on its runners. Multiple workflows in lancedb use action versions that target Node.js 20 (`actions/checkout@v4`, `actions/setup-node@v4`, `actions/cache@v4`, `actions/upload-artifact@v4`, `actions/download-artifact@v4`, `pnpm/action-setup@v4`). These are being force-run on Node.js 24, generating deprecation warnings. ## Solution Updated all deprecated actions to their latest major versions that support Node.js 24: | Action | Old Version | New Version | |--------|------------|-------------| | `actions/checkout` | @v4 | @v6 | | `actions/setup-node` | @v4 | @v6 | | `actions/cache` | @v4 | @v5 | | `actions/upload-artifact` | @v4 | @v7 | | `actions/download-artifact` | @v4 | @v8 | | `pnpm/action-setup` | @v4 | @v6 | Note: `actions/checkout@v6` and `actions/upload-artifact@v7` are already used in `pypi-publish.yml` — this PR extends the same versions to all remaining workflows. ### Files Changed - `.github/workflows/npm-publish.yml` — Updated checkout, setup-node, cache, upload-artifact, download-artifact, pnpm - `.github/workflows/nodejs.yml` — Updated checkout, setup-node, pnpm - `.github/workflows/python.yml` — Updated checkout - `.github/workflows/rust.yml` — Updated checkout - `.github/workflows/java.yml` — Updated checkout - `.github/workflows/java-publish.yml` — Updated checkout - `.github/workflows/cargo-publish.yml` — Updated checkout - `.github/workflows/docs.yml` — Updated checkout, setup-node - `.github/workflows/dev.yml` — Updated setup-node - `.github/workflows/codex-fix-ci.yml` — Updated checkout, setup-node, pnpm - `.github/workflows/codex-update-lance-dependency.yml` — Updated checkout, setup-node - `.github/workflows/license-header-check.yml` — Updated checkout - `.github/workflows/make-release-commit.yml` — Updated checkout - `.github/workflows/update_package_lock_run.yml` — Updated checkout - `.github/workflows/update_package_lock_run_nodejs.yml` — Updated checkout ## Verification - All 20 YAML files validated with `yaml.safe_load()` — no syntax errors - GitHub Actions CI will validate the actual action versions at runtime ## Changelog | Date | Change | Author | |------|--------|--------| | 2026-07-01 | Updated all deprecated Node 20 actions to latest versions across 15 workflow files | rtmalikian | --- **Disclosure:** This code was developed with assistance from DeepSeek-v4-pro (DeepSeek) via Hermes Agent (Nous Research). All changes were reviewed and verified for correctness. Signed-off-by: rtmalikian <rtmalikian@gmail.com>
234 lines
6.1 KiB
YAML
234 lines
6.1 KiB
YAML
name: Python
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- Cargo.toml
|
|
- Cargo.lock
|
|
- rust-toolchain.toml
|
|
- python/**
|
|
- rust/**
|
|
- .github/workflows/python.yml
|
|
- .github/workflows/build_linux_wheel/**
|
|
- .github/workflows/build_mac_wheel/**
|
|
- .github/workflows/build_windows_wheel/**
|
|
- .github/workflows/run_tests/**
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# Color output for pytest is off by default.
|
|
PYTEST_ADDOPTS: "--color=yes"
|
|
FORCE_COLOR: "1"
|
|
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/"
|
|
RUST_BACKTRACE: "1"
|
|
|
|
jobs:
|
|
lint:
|
|
name: "Lint"
|
|
timeout-minutes: 30
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install ruff
|
|
run: |
|
|
pip install ruff==0.9.9
|
|
- name: Format check
|
|
run: ruff format --check .
|
|
- name: Lint
|
|
run: ruff check .
|
|
|
|
type-check:
|
|
name: "Type Check"
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-2404-8x-x64
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install protobuf compiler
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
pip install toml
|
|
- name: Install dependencies
|
|
run: |
|
|
python ../ci/parse_requirements.py pyproject.toml --extras dev,tests,embeddings > requirements.txt
|
|
pip install -r requirements.txt
|
|
- name: Run pyright
|
|
run: pyright
|
|
|
|
doctest:
|
|
name: "Doctest"
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-2404-8x-x64
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
cache: "pip"
|
|
- name: Install protobuf
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- name: Install
|
|
run: |
|
|
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests,dev,embeddings]
|
|
pip install mlx
|
|
- name: Doctest
|
|
run: pytest --doctest-modules python/lancedb
|
|
linux:
|
|
name: "Linux: python-3.${{ matrix.python-minor-version }}"
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
python-minor-version: ["10", "13"]
|
|
runs-on: "ubuntu-24.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Install protobuf
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.${{ matrix.python-minor-version }}
|
|
- uses: ./.github/workflows/build_linux_wheel
|
|
with:
|
|
args: --profile ci
|
|
- uses: ./.github/workflows/run_tests
|
|
with:
|
|
integration: true
|
|
- name: Test without pylance or pandas
|
|
run: |
|
|
pip uninstall -y pylance pandas
|
|
pytest -vv python/tests/test_table.py
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
platform:
|
|
name: "Mac"
|
|
timeout-minutes: 30
|
|
runs-on: macos-14
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
- uses: ./.github/workflows/build_mac_wheel
|
|
with:
|
|
args: --profile ci
|
|
- uses: ./.github/workflows/run_tests
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
windows:
|
|
name: "Windows: ${{ matrix.config.name }}"
|
|
timeout-minutes: 60
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- name: x86
|
|
runner: windows-latest
|
|
runs-on: "${{ matrix.config.runner }}"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
- uses: ./.github/workflows/build_windows_wheel
|
|
with:
|
|
args: --profile ci
|
|
- uses: ./.github/workflows/run_tests
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
pydantic1x:
|
|
timeout-minutes: 60
|
|
runs-on: "ubuntu-24.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Install lancedb
|
|
run: |
|
|
pip install "pydantic<2"
|
|
pip install pyarrow==16
|
|
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests]
|
|
- name: Run tests
|
|
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/tests
|