mirror of
https://github.com/lancedb/lancedb.git
synced 2026-07-03 11:00:40 +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>
85 lines
2.8 KiB
YAML
85 lines
2.8 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, edited, synchronize, reopened]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
labeler:
|
|
permissions:
|
|
pull-requests: write
|
|
name: Label PR
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: srvaroa/labeler@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
commitlint:
|
|
permissions:
|
|
pull-requests: write
|
|
name: Verify PR title / description conforms to semantic-release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "18"
|
|
# These rules are disabled because Github will always ensure there
|
|
# is a blank line between the title and the body and Github will
|
|
# word wrap the description field to ensure a reasonable max line
|
|
# length.
|
|
- run: npm install @commitlint/config-conventional
|
|
- run: >
|
|
echo 'module.exports = {
|
|
"rules": {
|
|
"body-max-line-length": [0, "always", Infinity],
|
|
"footer-max-line-length": [0, "always", Infinity],
|
|
"body-leading-blank": [0, "always"]
|
|
}
|
|
}' > .commitlintrc.js
|
|
- run: npx commitlint --extends @commitlint/config-conventional --verbose <<< $COMMIT_MSG
|
|
env:
|
|
COMMIT_MSG: >
|
|
${{ github.event.pull_request.title }}
|
|
|
|
${{ github.event.pull_request.body }}
|
|
- if: failure()
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const message = `**ACTION NEEDED**
|
|
|
|
Lance follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) for release automation.
|
|
|
|
The PR title and description are used as the merge commit message.\
|
|
Please update your PR title and description to match the specification.
|
|
|
|
For details on the error please inspect the "PR Title Check" action.
|
|
`
|
|
// Get list of current comments
|
|
const comments = await github.paginate(github.rest.issues.listComments, {
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number
|
|
});
|
|
// Check if this job already commented
|
|
for (const comment of comments) {
|
|
if (comment.body === message) {
|
|
return // Already commented
|
|
}
|
|
}
|
|
// Post the comment about Conventional Commits
|
|
github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number,
|
|
body: message
|
|
})
|
|
core.setFailed(message)
|