Intelligence, Advanced Charting & Trading Platform

1 name: CI
2
3 on:
4 pull_request:
5 push:
6 branches: [main]
7
8 permissions:
9 contents: read
10
11 jobs:
12 verify:
13 runs-on: ubuntu-latest
14 timeout-minutes: 15
15 steps:
16 - name: Checkout
17 uses: actions/checkout@v4
18
19 - name: Setup pnpm
20 uses: pnpm/action-setup@v4
21 with:
22 version: 10.17.1
23
24 - name: Setup Node.js
25 uses: actions/setup-node@v4
26 with:
27 node-version: '20.19.0'
28 cache: pnpm
29
30 - name: Install dependencies
31 run: pnpm install --frozen-lockfile
32
33 - name: Verify
34 run: pnpm verify
35
36 postgres-invariants:
37 runs-on: ubuntu-latest
38 timeout-minutes: 10
39 services:
40 postgres:
41 image: postgres:18
42 env:
43 POSTGRES_USER: postgres
44 POSTGRES_PASSWORD: postgres
45 POSTGRES_DB: velyqor_test
46 ports:
47 - 5432:5432
48 options: >-
49 --health-cmd "pg_isready -U postgres -d velyqor_test"
50 --health-interval 5s
51 --health-timeout 5s
52 --health-retries 10
53 env:
54 PGPASSWORD: postgres
55 steps:
56 - name: Checkout
57 uses: actions/checkout@v4
58
59 - name: Apply PostgreSQL migrations
60 run: |
61 for file in db/migrations/*.sql; do
62 psql -h localhost -U postgres -d velyqor_test -v ON_ERROR_STOP=1 -f "$file"
63 done
64
65 - name: Execute persistence invariants
66 run: |
67 for file in db/tests/*.sql; do
68 psql -h localhost -U postgres -d velyqor_test -v ON_ERROR_STOP=1 -f "$file"
69 done