Skip to content

Commit 4060b2a

Browse files
authored
Merge pull request #3419 from verifywise-ai/develop
Merge develop into master (25 Feb)
2 parents bc24733 + 5e7fb54 commit 4060b2a

File tree

469 files changed

+45947
-13206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+45947
-13206
lines changed

.github/workflows/docker-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
VITE_APP_VERSION=${{ env.TAG }}
4848
4949
- name: Scan Frontend image with Trivy
50-
uses: aquasecurity/trivy-action@0.34.0
50+
uses: aquasecurity/trivy-action@0.34.1
5151
with:
5252
image-ref: 'verifywise-frontend:scan'
5353
format: 'sarif'
@@ -86,7 +86,7 @@ jobs:
8686
tags: verifywise-backend:scan
8787

8888
- name: Scan Backend image with Trivy
89-
uses: aquasecurity/trivy-action@0.34.0
89+
uses: aquasecurity/trivy-action@0.34.1
9090
with:
9191
image-ref: 'verifywise-backend:scan'
9292
format: 'sarif'
@@ -135,7 +135,7 @@ jobs:
135135
tags: verifywise-eval-server:scan
136136

137137
- name: Scan EvalServer image with Trivy
138-
uses: aquasecurity/trivy-action@0.34.0
138+
uses: aquasecurity/trivy-action@0.34.1
139139
with:
140140
image-ref: 'verifywise-eval-server:scan'
141141
format: 'sarif'

.github/workflows/e2e-tests.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: E2E Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
# Run manually or on specific branches/paths
8+
workflow_dispatch:
9+
pull_request:
10+
branches: ['master', 'develop']
11+
paths:
12+
- 'Clients/**'
13+
- 'Servers/**'
14+
15+
jobs:
16+
e2e-tests:
17+
name: Playwright E2E Tests
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 20
20+
21+
services:
22+
postgres:
23+
image: postgres:16
24+
env:
25+
POSTGRES_USER: postgres
26+
POSTGRES_PASSWORD: postgres
27+
POSTGRES_DB: verifywise_test
28+
ports:
29+
- 5432:5432
30+
options: >-
31+
--health-cmd pg_isready
32+
--health-interval 10s
33+
--health-timeout 5s
34+
--health-retries 5
35+
36+
redis:
37+
image: redis:7
38+
ports:
39+
- 6379:6379
40+
options: >-
41+
--health-cmd "redis-cli ping"
42+
--health-interval 10s
43+
--health-timeout 5s
44+
--health-retries 5
45+
46+
steps:
47+
- uses: actions/checkout@v6
48+
49+
- name: Set up Node
50+
uses: actions/setup-node@v6
51+
with:
52+
node-version: '20'
53+
54+
# ---- Backend setup ----
55+
- name: Install backend dependencies
56+
working-directory: Servers
57+
run: npm ci --legacy-peer-deps
58+
59+
- name: Build backend
60+
working-directory: Servers
61+
run: npm run build
62+
63+
- name: Run migrations
64+
working-directory: Servers
65+
env:
66+
DB_HOST: localhost
67+
DB_PORT: 5432
68+
DB_NAME: verifywise_test
69+
DB_USER: postgres
70+
DB_PASSWORD: postgres
71+
run: npx sequelize db:migrate
72+
73+
- name: Seed test data
74+
working-directory: Servers
75+
env:
76+
DB_HOST: localhost
77+
DB_PORT: 5432
78+
DB_NAME: verifywise_test
79+
DB_USER: postgres
80+
DB_PASSWORD: postgres
81+
run: node dist/scripts/seedTestData.js
82+
83+
- name: Start backend
84+
working-directory: Servers
85+
env:
86+
PORT: 3000
87+
NODE_ENV: test
88+
DB_HOST: localhost
89+
DB_PORT: 5432
90+
DB_NAME: verifywise_test
91+
DB_USER: postgres
92+
DB_PASSWORD: postgres
93+
REDIS_HOST: localhost
94+
REDIS_PORT: 6379
95+
JWT_SECRET: test-jwt-secret-for-e2e
96+
REFRESH_TOKEN_SECRET: test-refresh-secret-for-e2e
97+
ENCRYPTION_KEY: test-encryption-key-32chars!!
98+
MULTI_TENANCY_ENABLED: false
99+
run: |
100+
node dist/index.js &
101+
# Wait for backend to be ready
102+
for i in $(seq 1 30); do
103+
curl -s http://localhost:3000/api/users/check/exists && break
104+
sleep 1
105+
done
106+
107+
# ---- Frontend setup ----
108+
- name: Install frontend dependencies
109+
working-directory: Clients
110+
run: npm ci --legacy-peer-deps
111+
112+
- name: Install Playwright browsers
113+
working-directory: Clients
114+
run: npx playwright install --with-deps chromium
115+
116+
- name: Start frontend
117+
working-directory: Clients
118+
env:
119+
VITE_APP_API_BASE_URL: http://localhost:3000
120+
run: |
121+
npm run dev:vite &
122+
# Wait for frontend to be ready
123+
for i in $(seq 1 30); do
124+
curl -s http://localhost:5173 && break
125+
sleep 1
126+
done
127+
128+
# ---- Run E2E tests ----
129+
- name: Run Playwright tests
130+
working-directory: Clients
131+
env:
132+
E2E_BASE_URL: http://localhost:5173
133+
run: npx playwright test
134+
135+
- name: Upload Playwright report
136+
if: always()
137+
uses: actions/upload-artifact@v6
138+
with:
139+
name: playwright-report
140+
path: Clients/playwright-report/
141+
retention-days: 14
142+
143+
- name: Upload test results
144+
if: always()
145+
uses: actions/upload-artifact@v6
146+
with:
147+
name: playwright-results
148+
path: Clients/test-results/
149+
retention-days: 7

.github/workflows/frontend-checks.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,35 @@ jobs:
4747
path: audit-results.json
4848
retention-days: 30
4949

50+
unit-and-component-tests:
51+
name: Unit & Component Tests
52+
runs-on: ubuntu-latest
53+
defaults:
54+
run:
55+
working-directory: Clients
56+
57+
steps:
58+
- uses: actions/checkout@v6
59+
60+
- name: Set up Node
61+
uses: actions/setup-node@v6
62+
with:
63+
node-version: '20'
64+
65+
- name: Install dependencies
66+
run: npm ci --legacy-peer-deps
67+
68+
- name: Run tests with coverage
69+
run: npx vitest run --coverage
70+
71+
- name: Upload coverage report
72+
if: always()
73+
uses: actions/upload-artifact@v6
74+
with:
75+
name: frontend-coverage-report
76+
path: Clients/coverage/
77+
retention-days: 14
78+
5079
dependency-review:
5180
name: Dependency Review
5281
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fastapi.log
1515
react.log
1616
.idea/
1717
.claude
18-
CLAUDE.md
18+
# CLAUDE.md
1919
.kombai
2020
.vscode
2121
agent.md
@@ -39,4 +39,5 @@ node_modules/
3939
# EvalServer user uploads (keep directory structure, ignore uploaded files)
4040
EvaluationModule/data/uploads/*
4141
!EvaluationModule/data/uploads/.gitkeep
42-
nul
42+
nul
43+
agent-plan.md

0 commit comments

Comments
 (0)