Skip to content

Add Local Scripts to Reproduce Full CI #21048

Open

Description

@2010YOUY01

Is your feature request related to a problem or challenge?

It would be great to have a local script to run full CI, for all functional and non-functional(e.g. lints) tests, this helps development process for human and AI agents.

./dev/ci.sh      # Run full CI locally

Here is a previous work that provides a single script to run some non-functional tests

The remaining work is to

  • Continue supporting more non-functional tests
  • Create a similar script for all functional tests (rust tests, sqllogictests, extended tests, ...)

(might use xtask instead of scripts, see #23414)
### Tracker for non-functional tests

./dev/rust_lint.sh should fully reproduce non-functional CI locally.
./dev/rust_lint.sh --write --allow-dirty should do best-effort fixing where applicable.

Today the script covers cargo fmt, clippy, Cargo.toml formatting, license headers, typos, markdown prettier, and cargo doc.

Remaining CI checks that could be migrated similarly:

  • Semver / breaking API detector: .github/workflows/breaking_changes_detector.yml, ci/scripts/changed_crates.sh
  • Markdown link check: .github/workflows/dev.yml, ci/scripts/markdown_link_check.sh
  • ASF required status check validation: .github/workflows/dev.yml, ci/scripts/check_asf_yaml_status_checks.py
  • Security audit: .github/workflows/audit.yml, cargo audit
  • Dependency checks: .github/workflows/dependencies.yml, dev/depcheck, cargo machete
  • Large file check: .github/workflows/large_files.yml
  • CodeQL for GitHub Actions: .github/workflows/codeql.yml
  • Docs HTML build: .github/workflows/docs_pr.yaml, docs/build.sh
  • Config/function docs freshness: .github/workflows/rust.yml, dev/update_config_docs.sh, dev/update_function_docs.sh
  • Examples README freshness: .github/workflows/rust.yml, ci/scripts/check_examples_docs.sh

Potential Improvements to rust_lint.sh

  • Better naming.
  • Support running subsets, so developers and AI agents can run only checks likely affected by local changes.

Activity

  1. added
    enhancement
    on Mar 19, 2026
  2. added
    help wanted
    on Jun 24, 2026
  3. changed the title [-]Add Local Scripts to Reproduce Full CI[/-] [+]EPIC: Add Local Scripts to Reproduce Full CI[/+] on Jun 24, 2026
  4. changed the title [-]EPIC: Add Local Scripts to Reproduce Full CI[/-] [+]Add Local Scripts to Reproduce Full CI[/+] on Sep 10, 2026
  5. kumarUjjawal commented on Sep 16, 2026

    @kumarUjjawal
    Contributor

    Future improvements #25359 (review)

  6. akashjainn commented on Sep 17, 2026

    @akashjainn
    Contributor

    I'd like to take the Large file check item.

    Plan, following #25359: move the size check out of the inline run: block in .github/workflows/large_files.yml into ci/scripts/check_large_files.sh. The script takes a base ref and defaults to the merge base with origin/main, so it can run on a local branch; CI passes the PR or merge-queue SHAs it already has. The workflow's run: line becomes a call to the script so CI and the local suite share one definition, and dev/rust_lint.sh gets it as a read-only step.

  7. 5 remaining items

  8. pavankumargp6 commented on Nov 30, 2026

    @pavankumargp6

    Hi! I'd like to work on this. Adding local scripts to reproduce CI would help contributors test before pushing. I've been looking at the GitHub Actions workflows in .github/workflows/ and the ci/ directory. My plan is to create a ci/local.sh (or similar) that runs the same lint, test, and check steps as CI. Does that sound like the right approach?

  9. kumarUjjawal commented on Dec 1, 2026

    @kumarUjjawal
    Contributor

    Hi! I'd like to work on this. Adding local scripts to reproduce CI would help contributors test before pushing. I've been looking at the GitHub Actions workflows in .github/workflows/ and the ci/ directory. My plan is to create a ci/local.sh (or similar) that runs the same lint, test, and check steps as CI. Does that sound like the right approach?

    Thank you @pavankumargp6 for your interest. Although most of the work has already been completed in this issue item. The only one I see having any merit is

    Support running subsets, so developers and AI agents can run only checks likely affected by local changes.

    But please leave your plans here before working on it as I don't think its a top priority at the moment.

  10. pavankumargp6 commented on Dec 1, 2026

    @pavankumargp6

    Thanks @kumarUjjawal — agreed. I read through everything that landed here first so this doesn't duplicate work.

    Summary of what this issue has produced so far (12 merged): #24083 (cargo xtask ci step), #25256 (extended tests via xtask), #25195 (substrait/spark via xtask), #25287 (markdown links), #25313 (ASF checks), #25359 (security audit), #25399 (dependency checks), #25440 (large files), #25466 (examples README), #25525 (generated docs), #25586 (HTML docs build). Plus #23414, closed in favor of #24083. #25587 (CodeQL) and #25588 (semver) are still open drafts.

    So the remaining item with merit is subset selection for dev/rust_lint.sh. Here's my plan.

    Goal

    ./dev/rust_lint.sh can run only the checks likely affected by a local change. Functional-test subsets already exist via cargo xtask ci step test <variant>, so this only touches the non-functional suite.

    CLI (backward compatible)

    ./dev/rust_lint.sh                      # unchanged: run everything
    ./dev/rust_lint.sh --list               # list check names + the paths that select them
    ./dev/rust_lint.sh --only fmt,clippy    # run these checks only
    ./dev/rust_lint.sh --skip docs-html     # run everything except these
    ./dev/rust_lint.sh --changed            # select from local changes vs merge-base
    ./dev/rust_lint.sh --changed --base upstream/main
    ./dev/rust_lint.sh --changed --dry-run  # print selection and exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions