mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 09:12:39 +00:00
ci: optimize test workflows — reduce jobs, share venv via artifact
- Restructure tests.yml: install once per Python version, share .venv via artifact instead of 32 independent installs - Reduce test groups from 8 to 4 (tests only take ~60s per group) - Only test Python 3.12+3.13 on PRs; full matrix on push to main - Switch all workflows from manual actions/cache to setup-uv built-in caching, eliminating cache race conditions - Add --frozen flag to uv sync for deterministic CI installs - Re-enable duration-based test splitting with least_duration algorithm (was disabled due to a bug in the path filter) - Fix update-test-durations path filter (tests/**/*.py never matched actual test dirs under lib/) - Add concurrency group with cancel-in-progress for PR runs - Add gate jobs to satisfy existing branch protection required checks
This commit is contained in:
20
.github/workflows/build-uv-cache.yml
vendored
20
.github/workflows/build-uv-cache.yml
vendored
@@ -25,24 +25,12 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
- name: Install uv and populate cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.8.4"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
enable-cache: false
|
||||
enable-cache: true
|
||||
|
||||
- name: Install dependencies and populate cache
|
||||
run: |
|
||||
echo "Building global UV cache for Python ${{ matrix.python-version }}..."
|
||||
uv sync --all-groups --all-extras --no-install-project
|
||||
echo "Cache populated successfully"
|
||||
|
||||
- name: Save uv caches
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/uv
|
||||
~/.local/share/uv
|
||||
.venv
|
||||
key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
|
||||
- name: Install dependencies
|
||||
run: uv sync --all-groups --all-extras --frozen --no-install-project
|
||||
|
||||
Reference in New Issue
Block a user