Skip to content

Commit 1dc89e7

Browse files
committed
fix(ci): upload db dump artifacts
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent 726eb64 commit 1dc89e7

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/integration-test.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
POSTGRES_USER: root
9090
POSTGRES_PASSWORD: rootpassword
9191
POSTGRES_DB: nextcloud
92-
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
92+
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5 --name postgres --hostname postgres
9393

9494
steps:
9595
- name: Checkout server
@@ -214,6 +214,14 @@ jobs:
214214
php cron.php
215215
sleep 10
216216
done &
217+
sleep 30
218+
# list all the bg jobs
219+
./occ background-job:list
220+
221+
- name: Initial dump of DB with context_chat_queue populated
222+
run: |
223+
docker exec postgres pg_dump ccb > /tmp/0_pgdump_ccb
224+
docker exec postgres pg_dump nextcloud > /tmp/0_pgdump_nextcloud
217225
218226
- name: Periodically check context_chat stats for 15 minutes to allow the backend to index the files
219227
run: |
@@ -315,6 +323,11 @@ jobs:
315323
echo "Memory usage during scan is stable. No memory leak detected."
316324
fi
317325
326+
- name: Final dump of DB with vectordb populated
327+
run: |
328+
docker exec postgres pg_dump ccb > /tmp/1_pgdump_ccb
329+
docker exec postgres pg_dump nextcloud > /tmp/1_pgdump_nextcloud
330+
318331
- name: Show server logs
319332
if: always()
320333
run: |
@@ -350,6 +363,16 @@ jobs:
350363
run: |
351364
tail -v -n +1 context_chat_backend/persistent_storage/logs/em_server.log* || echo "No logs in logs directory"
352365
366+
- name: Upload database dumps
367+
uses: actions/upload-artifact@v4
368+
with:
369+
name: database-dumps
370+
path: |
371+
/tmp/0_pgdump_ccb
372+
/tmp/0_pgdump_nextcloud
373+
/tmp/1_pgdump_ccb
374+
/tmp/1_pgdump_nextcloud
375+
353376
summary:
354377
permissions:
355378
contents: none

0 commit comments

Comments
 (0)