Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit ee151a7

Browse files
committed
Add env secrets
1 parent 76423e8 commit ee151a7

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/integration-tests.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@ jobs:
2424
pip install r2r
2525
2626
- name: Start R2R server
27-
run: r2r serve --port=8000 &
27+
env:
28+
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
29+
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
30+
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
31+
POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
32+
POSTGRES_DBNAME: ${{ secrets.POSTGRES_DBNAME }}
33+
POSTGRES_VECS_COLLECTION: ${{ secrets.POSTGRES_VECS_COLLECTION }}
34+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
35+
run: |
36+
r2r serve --port=8000 > r2r_server.log 2>&1 &
37+
sleep 15
2838
2939
- name: Use Node.js
3040
uses: actions/setup-node@v2
@@ -36,8 +46,15 @@ jobs:
3646

3747
- name: Check if R2R server is running
3848
run: |
39-
sleep 10
4049
curl http://localhost:8000/health || echo "Server not responding"
4150
51+
- name: Display R2R server logs if server not responding
52+
if: failure()
53+
run: cat r2r_server.log
54+
4255
- name: Run integration tests
4356
run: npm run test
57+
58+
- name: Display R2R server logs if tests fail
59+
if: failure()
60+
run: cat r2r_server.log

0 commit comments

Comments
 (0)