Skip to content

Commit c1fbeef

Browse files
committed
ci: Clean up some disk space before running tests
Running against a `system-postgres` can cause the disk to fill up. Cleaning up some more space hopefully makes them work again. Technically the postgres DBs are deleted after the test, however that may be delayed, and many nodes in parallel will cause the disk to fill up.
1 parent f6be055 commit c1fbeef

File tree

2 files changed

+21
-0
lines changed
  • .github/workflows
  • contrib/pyln-testing/pyln/testing

2 files changed

+21
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,26 @@ jobs:
310310
- name: Checkout
311311
uses: actions/checkout@v4
312312

313+
- name: Check disk space pre-cleanup
314+
run: df -h
315+
- name: Free up disk space
316+
# We need more space than GHA usually provides when testing
317+
# against the `postgres` service. This step frees some space
318+
# on the volume containing tools, in the hope of freeing
319+
# enough space for postgres tests to succeed.
320+
uses: jlumbroso/free-disk-space@main
321+
with:
322+
# Enable all cleanup options
323+
tool-cache: true
324+
android: true
325+
dotnet: true
326+
haskell: true
327+
swift: true
328+
golang: true
329+
php: true
330+
- name: Check disk space pre-cleanup
331+
run: df -h
332+
313333
- name: Set up Python 3.10
314334
uses: actions/setup-python@v5
315335
with:

contrib/pyln-testing/pyln/testing/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def stop(self):
113113
cur = conn.cursor()
114114
cur.execute("DROP DATABASE {};".format(self.dbname))
115115
cur.close()
116+
conn.close()
116117

117118
def wipe_db(self):
118119
cur = self.conn.cursor()

0 commit comments

Comments
 (0)