Skip to content

Commit 073f9d0

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

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/integration-test.yml

Lines changed: 20 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,13 @@ 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 nextcloud > /tmp/0_pgdump_nextcloud
217224
218225
- name: Periodically check context_chat stats for 15 minutes to allow the backend to index the files
219226
run: |
@@ -315,6 +322,10 @@ jobs:
315322
echo "Memory usage during scan is stable. No memory leak detected."
316323
fi
317324
325+
- name: Final dump of DB with vectordb populated
326+
run: |
327+
docker exec postgres pg_dump nextcloud > /tmp/1_pgdump_nextcloud
328+
318329
- name: Show server logs
319330
if: always()
320331
run: |
@@ -350,6 +361,14 @@ jobs:
350361
run: |
351362
tail -v -n +1 context_chat_backend/persistent_storage/logs/em_server.log* || echo "No logs in logs directory"
352363
364+
- name: Upload database dumps
365+
uses: actions/upload-artifact@v4
366+
with:
367+
name: database-dumps
368+
path: |
369+
/tmp/0_pgdump_nextcloud
370+
/tmp/1_pgdump_nextcloud
371+
353372
summary:
354373
permissions:
355374
contents: none

0 commit comments

Comments
 (0)