Skip to content

Commit 35681d8

Browse files
committed
save space for ci
1 parent 8272a83 commit 35681d8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ jobs:
321321
path: ~/.cache/ms-playwright
322322
key: ${{ runner.os }}-${{ matrix.target }}-playwright-${{ hashFiles('Cargo.lock') }}
323323

324+
- name: Delete Playwright browsers to save space (Linux)
325+
if: always() && runner.os == 'Linux' && env.PLAYWRIGHT_TEST_ENABLED == '1'
326+
continue-on-error: true
327+
run: |
328+
rm -rf ~/.cache/ms-playwright || true
324329
- name: Save Playwright browsers cache (macOS)
325330
if: always() && runner.os == 'macOS' && env.PLAYWRIGHT_TEST_ENABLED == '1'
326331
continue-on-error: true
@@ -329,6 +334,11 @@ jobs:
329334
path: ~/Library/Caches/ms-playwright
330335
key: ${{ runner.os }}-${{ matrix.target }}-playwright-${{ hashFiles('Cargo.lock') }}
331336

337+
- name: Delete Playwright browsers to save space (macOS)
338+
if: always() && runner.os == 'macOS' && env.PLAYWRIGHT_TEST_ENABLED == '1'
339+
continue-on-error: true
340+
run: |
341+
rm -rf ~/Library/Caches/ms-playwright || true
332342
- name: Save Playwright browsers cache (Windows)
333343
if: always() && runner.os == 'Windows' && env.PLAYWRIGHT_TEST_ENABLED == '1'
334344
continue-on-error: true
@@ -337,6 +347,12 @@ jobs:
337347
path: ~/AppData/Local/ms-playwright
338348
key: ${{ runner.os }}-${{ matrix.target }}-playwright-${{ hashFiles('Cargo.lock') }}
339349

350+
- name: Delete Playwright browsers to save space (Windows)
351+
if: always() && runner.os == 'Windows' && env.PLAYWRIGHT_TEST_ENABLED == '1'
352+
continue-on-error: true
353+
run: |
354+
rm -rf ~/AppData/Local/ms-playwright || true
355+
340356
- name: Check if tests failed and fail the workflow
341357
if: always() && steps.run-tests.outcome == 'failure'
342358
run: |
@@ -376,6 +392,19 @@ jobs:
376392
echo "Running doctests..."
377393
cargo test --doc --features python-driver --target ${{ matrix.target }}
378394
395+
- name: Remove Python conda environment to save space
396+
if: matrix.cross == false
397+
continue-on-error: true
398+
run: |
399+
conda remove -n test-env --all -y || true
400+
echo "Removed conda environment to save space"
401+
402+
- name: Remove conda to save space
403+
continue-on-error: true
404+
shell: bash -l {0}
405+
run: |
406+
rm -rf $CONDA || true
407+
echo "Removed conda installation to save space"
379408
- name: Cache Rust dependencies and target
380409
uses: actions/cache/save@v5
381410
with:

0 commit comments

Comments
 (0)