Skip to content

Commit 6ebb99b

Browse files
committed
update workflow
1 parent d85736f commit 6ebb99b

1 file changed

Lines changed: 13 additions & 100 deletions

File tree

.github/workflows/experiment.yaml

Lines changed: 13 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI (A-M)
1+
name: CI Unit
22
on: [pull_request]
33

44
concurrency:
@@ -7,7 +7,7 @@ concurrency:
77

88
jobs:
99
# =========================================================
10-
# 1. DISCOVERY (Natively grabs packages starting with A-M)
10+
# 1. DISCOVERY (Outputs up to 256 packages globally)
1111
# =========================================================
1212
discover:
1313
runs-on: ubuntu-latest
@@ -18,21 +18,21 @@ jobs:
1818
- id: changes
1919
uses: tj-actions/changed-files@v44
2020
with:
21-
files: packages/[a-m]*/**
21+
files: packages/**
2222
dir_names: true
2323
dir_names_max_depth: 2
2424
matrix: true
2525

2626
# =========================================================
27-
# 2. UNIT TESTS (Fast Sequential Matrix)
27+
# 2. EXECUTION (1 Job = 1 Package)
2828
# =========================================================
2929
unit:
3030
needs: discover
3131
if: ${{ needs.discover.outputs.packages != '[]' && needs.discover.outputs.packages != '' }}
3232
runs-on: ubuntu-latest
3333
strategy:
3434
fail-fast: false
35-
max-parallel: 25
35+
max-parallel: 40 # Org limit protection
3636
matrix:
3737
package: ${{ fromJSON(needs.discover.outputs.packages) }}
3838

@@ -42,113 +42,26 @@ jobs:
4242
- uses: astral-sh/setup-uv@v5
4343
with:
4444
enable-cache: true
45-
- name: Run Unit Tests (All Python Versions)
45+
- name: Run Python Versions Sequentially
4646
run: |
4747
cd ${{ matrix.package }}
4848
export NOX_DEFAULT_VENV_BACKEND=uv
4949
export UV_PRERELEASE=allow
50-
5150
uvx --with 'nox[uv]' nox -s "unit-3.9" "unit-3.10" "unit-3.11" "unit-3.12" "unit-3.14"
5251
5352
# =========================================================
54-
# 3. LINT
53+
# 3. AGGREGATOR (Branch Protection Target)
5554
# =========================================================
56-
lint:
57-
needs: discover
58-
if: ${{ needs.discover.outputs.packages != '[]' && needs.discover.outputs.packages != '' }}
59-
runs-on: ubuntu-latest
60-
strategy:
61-
fail-fast: false
62-
max-parallel: 15
63-
matrix:
64-
package: ${{ fromJSON(needs.discover.outputs.packages) }}
65-
66-
name: Lint (${{ matrix.package }})
67-
steps:
68-
- uses: actions/checkout@v4
69-
- uses: astral-sh/setup-uv@v5
70-
with:
71-
python-version: "3.14"
72-
enable-cache: true
73-
- name: Run Lint
74-
run: |
75-
cd ${{ matrix.package }}
76-
export NOX_DEFAULT_VENV_BACKEND=uv
77-
uvx --with 'nox[uv]' nox -s "lint"
78-
79-
# =========================================================
80-
# 4. DOCS
81-
# =========================================================
82-
docs:
83-
needs: discover
84-
if: ${{ needs.discover.outputs.packages != '[]' && needs.discover.outputs.packages != '' }}
85-
runs-on: ubuntu-latest
86-
strategy:
87-
fail-fast: false
88-
max-parallel: 15
89-
matrix:
90-
package: ${{ fromJSON(needs.discover.outputs.packages) }}
91-
92-
name: Docs (${{ matrix.package }})
93-
steps:
94-
- uses: actions/checkout@v4
95-
- uses: astral-sh/setup-uv@v5
96-
with:
97-
python-version: "3.14"
98-
enable-cache: true
99-
- name: Run Docs
100-
run: |
101-
cd ${{ matrix.package }}
102-
export NOX_DEFAULT_VENV_BACKEND=uv
103-
uvx --with 'nox[uv]' nox -s "docs"
104-
105-
# =========================================================
106-
# 5. CORE DEPENDENCIES
107-
# =========================================================
108-
core-deps:
109-
needs: discover
110-
if: ${{ needs.discover.outputs.packages != '[]' && needs.discover.outputs.packages != '' }}
111-
runs-on: ubuntu-latest
112-
strategy:
113-
fail-fast: false
114-
max-parallel: 25
115-
matrix:
116-
package: ${{ fromJSON(needs.discover.outputs.packages) }}
117-
118-
name: Core Deps (${{ matrix.package }})
119-
steps:
120-
- uses: actions/checkout@v4
121-
- uses: astral-sh/setup-uv@v5
122-
with:
123-
enable-cache: true
124-
- name: Run Core Deps (All Python Versions)
125-
run: |
126-
cd ${{ matrix.package }}
127-
export NOX_DEFAULT_VENV_BACKEND=uv
128-
129-
FAILED=0
130-
for py in 3.9 3.10 3.11 3.12 3.14; do
131-
echo "::group::Core Deps ($py)"
132-
uvx --with 'nox[uv]' nox -s "core_deps_from_source" -p "$py" || FAILED=1
133-
echo "::endgroup::"
134-
done
135-
exit $FAILED
136-
137-
# =========================================================
138-
# 6. AGGREGATOR (Required for Branch Protection)
139-
# =========================================================
140-
ci-success:
141-
name: CI Success (A-M)
142-
needs: [unit, lint, docs, core-deps]
143-
# Always run so GitHub doesn't hang if jobs were successfully skipped
55+
ci-unit-success:
56+
name: Unit Tests Success
57+
needs: [unit]
14458
if: always()
14559
runs-on: ubuntu-latest
14660
steps:
147-
- name: Verify all matrices passed
61+
- name: Verify matrix passed
14862
run: |
14963
if [ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" = "true" ]; then
150-
echo "::error::One or more test matrices failed in A-M."
64+
echo "::error::One or more unit tests failed."
15165
exit 1
152-
else
153-
echo "All required tests passed or were safely skipped!"
15466
fi
67+
echo "All unit tests passed!"

0 commit comments

Comments
 (0)