Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7a6c6cd
chore: create a release
noahdietz Apr 30, 2026
badbf42
wip
ohmayr May 6, 2026
699fc63
add core-deps-from-source
ohmayr May 6, 2026
4fb760b
update discover
ohmayr May 6, 2026
f2ac24d
update workflow
ohmayr May 6, 2026
87cf0b6
update discover
ohmayr May 6, 2026
b25c456
update workflow
ohmayr May 6, 2026
18ec2de
loop before leap
ohmayr May 6, 2026
8852bed
use pip instead of uv
ohmayr May 6, 2026
bfc156a
make core-deps uv compatible
ohmayr May 6, 2026
4ea79e6
update core-deps workflow to use uv
ohmayr May 6, 2026
8635b36
update workflow
ohmayr May 6, 2026
fff81f0
update workflow
ohmayr May 6, 2026
d85736f
update workflow
ohmayr May 6, 2026
6ebb99b
update workflow
ohmayr May 6, 2026
a95259f
update workflow
ohmayr May 6, 2026
41ae618
update workflow
ohmayr May 6, 2026
50096e7
update workflow
ohmayr May 6, 2026
56b65d3
run tests concurrently
ohmayr May 6, 2026
1fc5edc
update workflow
ohmayr May 7, 2026
4f69499
Merge branch 'main' into test-librarian-with-new-wrkflw
ohmayr May 7, 2026
ed3f47f
rename script
ohmayr May 7, 2026
ce6aae1
update chunk
ohmayr May 7, 2026
15b38f7
update chunk to install pip
ohmayr May 7, 2026
1fb9cd4
use max-vms=6
ohmayr May 11, 2026
4f58b08
increase vms and mammoth overrides
ohmayr May 11, 2026
26772bc
update workflow
ohmayr May 11, 2026
c21d471
update workflow
ohmayr May 11, 2026
fdbdd49
update workflow
ohmayr May 11, 2026
1be510a
update matrix script
ohmayr May 11, 2026
f58dee6
add prerelease and core-deps
ohmayr May 11, 2026
7b91080
add docs and lint workflows
ohmayr May 12, 2026
274f7ac
update prerelease
ohmayr May 12, 2026
2421627
only test core-deps-from-source
ohmayr May 12, 2026
00d7dcd
Merge branch 'main' into test-librarian-with-new-wrkflw
ohmayr May 12, 2026
48bce66
merge main
ohmayr May 12, 2026
3e115cd
rename script
ohmayr May 12, 2026
d1aa621
remove ci-docs and ci-lint
ohmayr May 12, 2026
089d152
update chunk
ohmayr May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
169 changes: 169 additions & 0 deletions .github/workflows/experiment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: Next-Gen CI Pipeline

on:
pull_request:
branches: [ main, preview ]
# Native Merge Queue support for exhaustive batching
merge_group:
types: [checks_requested]

# Stop burning money on abandoned iterative commits
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
# ==========================================
# 1. DISCOVERY ENGINE (The Router)
# ==========================================
discover:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.changes.outputs.all_changed_files }}
# Expose the dynamic Python matrix to downstream jobs
python_versions: ${{ steps.set-python.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Detect Changed Packages
id: changes
uses: tj-actions/changed-files@v44
with:
files: packages/**
dir_names: true
dir_names_max_depth: 2
json: true
escape_json: false

- name: Determine Python Matrix (Risk-Tiering)
id: set-python
run: |
if [[ "${{ github.event_name }}" == "merge_group" ]]; then
echo "Merge Queue detected. Deploying exhaustive matrix."
echo 'matrix=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]' >> $GITHUB_OUTPUT
else
echo "Pull Request detected. Deploying Min/Max Boundary matrix."
echo 'matrix=["3.9", "3.14"]' >> $GITHUB_OUTPUT
fi

# ==========================================
# 2. STATIC ANALYSIS (Grouped for Speed)
# ==========================================
static-checks:
needs: discover
if: ${{ needs.discover.outputs.packages != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.discover.outputs.packages) }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.14"
enable-cache: true
cache-dependency-glob: "${{ matrix.package }}/setup.py"

- name: Run Lint and MyPy
run: |
cd ${{ matrix.package }}
export NOX_DEFAULT_VENV_BACKEND=uv
export UV_VENV_SEED=1
uvx --with 'nox[uv]' nox -s lint mypy lint_setup_py

# ==========================================
# 3. DOCUMENTATION BUILD
# ==========================================
docs-build:
needs: discover
if: ${{ needs.discover.outputs.packages != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.discover.outputs.packages) }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
enable-cache: true
cache-dependency-glob: "${{ matrix.package }}/setup.py"

- name: Build Docs and DocFX
run: |
cd ${{ matrix.package }}
export NOX_DEFAULT_VENV_BACKEND=uv
export UV_VENV_SEED=1
uvx --with 'nox[uv]' nox -s docs docfx

# ==========================================
# 4. UNIT TESTS (Dynamic 2D Matrix + Retries)
# ==========================================
unit-tests:
needs: discover
if: ${{ needs.discover.outputs.packages != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.discover.outputs.packages) }}
# Reads the array generated by the Discovery job
python: ${{ fromJSON(needs.discover.outputs.python_versions) }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
cache-dependency-glob: "${{ matrix.package }}/setup.py"

- name: Execute Unit Tests (With Shock Absorbers)
run: |
cd ${{ matrix.package }}
export NOX_DEFAULT_VENV_BACKEND=uv
export UV_VENV_SEED=1
export UV_COMPILE_BYTECODE=1

# 3-Attempt retry loop to mask legacy flaky tests
for i in 1 2 3; do
echo "Attempt $i of 3 for Python ${{ matrix.python }}..."
if uvx --with 'nox[uv]' nox -s unit-${{ matrix.python }}; then
echo "Tests passed successfully!"
exit 0
fi
echo "Tests failed. Waiting 5 seconds before retrying..."
sleep 5
done

echo "::error::Tests failed after 3 attempts. This is a hard failure."
exit 1

# ==========================================
# 6. THE GATEKEEPER (Status Check Rollup)
# ==========================================
presubmit-passed:
if: always()
needs:
- discover
- static-checks
- docs-build
- unit-tests
runs-on: ubuntu-latest
steps:
- name: Evaluate Pipeline Status
run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "::error::One or more required CI jobs failed or were cancelled."
exit 1
fi

if [[ "${{ needs.discover.outputs.packages }}" == "[]" ]]; then
echo "No Python packages changed. Safely bypassing execution."
exit 0
fi

echo "All dynamically generated CI jobs completed successfully."
Loading
Loading