mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-06 01:32:36 +00:00
fix: use safe filenames for test durations with underscores
This commit is contained in:
9
.github/workflows/tests.yml
vendored
9
.github/workflows/tests.yml
vendored
@@ -48,16 +48,19 @@ jobs:
|
||||
- name: Restore test durations
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .test_durations_py${{ matrix.python-version }}
|
||||
path: .test_durations_py*
|
||||
key: test-durations-py${{ matrix.python-version }}-
|
||||
restore-keys: |
|
||||
test-durations-py${{ matrix.python-version }}-
|
||||
|
||||
- name: Run tests (group ${{ matrix.group }} of 8)
|
||||
run: |
|
||||
if [ -f .test_durations_py${{ matrix.python-version }} ]; then
|
||||
PYTHON_VERSION_SAFE=$(echo "${{ matrix.python-version }}" | tr '.' '_')
|
||||
DURATION_FILE=".test_durations_py${PYTHON_VERSION_SAFE}"
|
||||
|
||||
if [ -f "$DURATION_FILE" ]; then
|
||||
echo "Using cached test durations for optimal splitting"
|
||||
DURATIONS_ARG="--durations-path=.test_durations_py${{ matrix.python-version }}"
|
||||
DURATIONS_ARG="--durations-path=${DURATION_FILE}"
|
||||
else
|
||||
echo "No cached durations found, tests will be split evenly"
|
||||
DURATIONS_ARG=""
|
||||
|
||||
5
.github/workflows/update-test-durations.yml
vendored
5
.github/workflows/update-test-durations.yml
vendored
@@ -49,14 +49,15 @@ jobs:
|
||||
|
||||
- name: Run all tests and store durations
|
||||
run: |
|
||||
uv run pytest --store-durations --durations-path=.test_durations_py${{ matrix.python-version }} -n auto
|
||||
PYTHON_VERSION_SAFE=$(echo "${{ matrix.python-version }}" | tr '.' '_')
|
||||
uv run pytest --store-durations --durations-path=.test_durations_py${PYTHON_VERSION_SAFE} -n auto
|
||||
continue-on-error: true
|
||||
|
||||
- name: Save durations to cache
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: .test_durations_py${{ matrix.python-version }}
|
||||
path: .test_durations_py*
|
||||
key: test-durations-py${{ matrix.python-version }}-${{ github.sha }}
|
||||
|
||||
- name: Save uv caches
|
||||
|
||||
Reference in New Issue
Block a user