Skip to content

Commit 7da8e7a

Browse files
committed
Add e2e workflow
1 parent c8a0499 commit 7da8e7a

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: E2E tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
- "*-stable"
8+
pull_request:
9+
types: [opened, synchronize, reopened, ready_for_review]
10+
branches:
11+
- "main"
12+
- "*-stable"
13+
14+
jobs:
15+
e2e-tests:
16+
runs-on: ubuntu-22.04
17+
timeout-minutes: 10
18+
name: e2e-tests
19+
env:
20+
PREMIUM_EMBEDDING_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
21+
permissions:
22+
id-token: write
23+
contents: read
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Run Sample App in Docker
29+
run: |
30+
cp .env.docker.example .env.docker &&
31+
npm run docker:up -d &&
32+
while ! nc -z localhost 4400; do sleep 1; done
33+
34+
- name: Install Chrome v111
35+
uses: browser-actions/setup-chrome@v1
36+
with:
37+
# https://chromium.cypress.io/linux/stable/111.0.5563.146
38+
chrome-version: 1097615
39+
id: setup-chrome
40+
41+
- name: Ensure that Cypress executable is ready
42+
run: npm ci --prefix e2e
43+
44+
- name: Run e2e tests
45+
id: run-e2e-tests
46+
run: cd e2e && npm run cypress:run
47+
48+
- name: Upload Cypress Artifacts upon failure
49+
uses: actions/upload-artifact@v4
50+
if: ${{ steps.run-e2e-tests.outcome != 'success' }}
51+
with:
52+
name: cypress-recording-latest
53+
path: |
54+
./e2e/cypress
55+
if-no-files-found: ignore

0 commit comments

Comments
 (0)