-
Notifications
You must be signed in to change notification settings - Fork 129
67 lines (59 loc) · 2.08 KB
/
e2e.yml
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
65
66
67
name: End-to-End Tests
on:
pull_request:
types: [opened, synchronize]
jobs:
e2e:
runs-on: ubuntu-latest
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
matrix:
containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Start Middleware Containers
run: |
docker compose -f deploy/docker/docker-compose.middleware.yml up -d
docker ps
- name: Install yq
run: |
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq
chmod +x /usr/local/bin/yq
- name: Wait for Middleware Containers to be Healthy
run: |
CONTAINERS=$(yq e '.services | map(.container_name) | join(" ")' deploy/docker/docker-compose.middleware.yml)
bash scripts/wait-for-container-health.sh $CONTAINERS
docker ps
- name: E2E Tests
uses: cypress-io/github-action@v6
with:
browser: chrome
record: true
parallel: true
build: pnpm copy-env build
start: pnpm start
wait-on: 'http://localhost:5700,http://localhost:5800'
env:
VITE_API_URL: 'http://localhost:5800'
VITE_COLLAB_URL: 'http://localhost:5801'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: 'ci'
NODE_OPTIONS: '--max_old_space_size=8192'
MOCK_LLM_RESPONSE: true
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
CYPRESS_BASE_URL: 'http://localhost:5700'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }}