-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (52 loc) · 1.43 KB
/
integration.yml
File metadata and controls
64 lines (52 loc) · 1.43 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
63
64
name: Integration Tests
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
# Allow manual trigger
workflow_dispatch:
permissions:
contents: read
jobs:
integration:
name: Server Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
# Install mobile app dependencies
- name: Install dependencies
run: pnpm install
# Install HotCRM submodule dependencies and build
- name: Setup HotCRM server
run: |
cd server/hotcrm
pnpm install
pnpm build
# Start the server in background
- name: Start HotCRM server
run: ./scripts/start-integration-server.sh --bg
env:
PORT: 4000
# Wait for server readiness
- name: Wait for server
run: ./scripts/wait-for-server.sh http://localhost:4000/api/v1/auth/get-session 60
# Run integration tests
- name: Run integration tests
run: pnpm test:integration:server
env:
INTEGRATION_SERVER_URL: http://localhost:4000
# Stop server
- name: Stop HotCRM server
if: always()
run: ./scripts/stop-integration-server.sh