forked from Ethereal-Future/FuTuRe
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.64 KB
/
Copy pathintegration-tests.yml
File metadata and controls
62 lines (53 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Integration Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
integration-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: future_test
POSTGRES_USER: future_admin
POSTGRES_PASSWORD: test_password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.3.0
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run Prisma Migrations
run: npx prisma migrate deploy
working-directory: ./backend
env:
DATABASE_URL: postgresql://future_admin:test_password@localhost:5432/future_test
- name: Run Integration Tests
run: npm run test:integration:all
working-directory: ./backend
env:
DATABASE_URL: postgresql://future_admin:test_password@localhost:5432/future_test
NODE_ENV: test
JWT_SECRET: test-secret
STELLAR_NETWORK: testnet
HORIZON_URL: https://horizon-testnet.stellar.org
- name: Upload Test Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: integration-test-reports
path: backend/test-reports/
retention-days: 30