Skip to content

Commit 5da21ba

Browse files
Try freeing up disk space before running tests
Signed-off-by: Kate Goldenring <[email protected]>
1 parent 60a18ea commit 5da21ba

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
run: make install-k3d
6464

6565
- name: run integration tests
66-
run: BIN_DIR="./bin" make integration-tests
66+
run: BIN_DIR="./bin" IS_CI=true make integration-tests
6767

6868
- name: run collect debug logs
6969
if: failure()
@@ -76,7 +76,9 @@ jobs:
7676
name: debug-logs
7777
path: debug-logs/
7878
retention-days: 5
79-
79+
- name: Output runner storage on failure
80+
if: failure()
81+
run: df -h
8082
- name: clean up k3d
8183
if: always()
8284
run: make tests/clean

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ else
1212
VERBOSE_FLAG := -vvv
1313
endif
1414

15+
IS_CI ?= false
1516
BIN_DIR ?=
1617

1718
UNAME_S := $(shell uname -s)
@@ -52,6 +53,9 @@ unit-tests: build
5253
integration-tests: prepare-cluster-and-images integration-docker-build-push-tests integration-spin-registry-push-tests
5354
echo "Integration tests complete. You may run 'make tests/clean' to clean up the test environment."
5455

56+
free-disk:
57+
./scripts/free-disk.sh
58+
5559
# integration-tests for workloads pushed using docker build push
5660
integration-docker-build-push-tests:
5761
./scripts/run-integration-tests.sh "workloads-pushed-using-docker-build-push"
@@ -126,7 +130,7 @@ deploy-workloads-pushed-using-spin-registry-push:
126130
pod-terminates-test:
127131
./scripts/pod-terminates-test.sh
128132

129-
prepare-cluster-and-images: check-bins move-bins up pod-status-check
133+
prepare-cluster-and-images: check-bins move-bins up free-disk pod-status-check
130134

131135
# clean
132136

scripts/free-disk.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
IS_CI=${IS_CI:-false}
4+
5+
# clean up Rust builds to free space
6+
cargo install cargo-clean-all
7+
cargo clean-all -y
8+
if [ "$IS_CI" = true ]; then
9+
# remove all docker images
10+
docker system prune -af
11+
fi

0 commit comments

Comments
 (0)