-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (75 loc) · 2.56 KB
/
e2e.yml
File metadata and controls
88 lines (75 loc) · 2.56 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: E2E Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
# Ollama config for AI assistant tests
OLLAMA_MODELS: /home/runner/.ollama/models
jobs:
e2e:
name: Playwright E2E
runs-on: ubuntu-latest
timeout-minutes: 15
env:
API_BASE_URL: http://localhost:9090
OIDC_ISSUER_URL: http://localhost:4000
OIDC_CLIENT_ID: test-only-not-a-real-id
OIDC_CLIENT_SECRET: test-only-not-a-real-secret
OIDC_PROVIDER_ID: oidc
BETTER_AUTH_URL: http://localhost:3000
BETTER_AUTH_SECRET: test-only-not-a-real-better-auth-secret
USE_E2E_MODEL: "true"
E2E_MODEL_NAME: qwen2.5:1.5b
OLLAMA_BASE_URL: http://localhost:11434
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Cache Ollama models
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: /home/runner/.ollama/models
key: ollama-qwen2.5-1.5b-v3
- name: Start Ollama via Docker
run: |
mkdir -p /home/runner/.ollama/models
docker run -d \
-v /home/runner/.ollama/models:/root/.ollama/models \
-p 11434:11434 \
--name ollama \
ollama/ollama:0.15.4
# Wait for Ollama to be ready
for i in {1..30}; do
curl -sf http://localhost:11434/api/tags && break
sleep 1
done
- name: Pull Ollama model
run: docker exec ollama ollama pull qwen2.5:1.5b
- name: Setup
uses: ./.github/actions/setup
- name: Cache Playwright browsers
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
- name: Build production app
run: pnpm build
env:
# These env vars must match the runtime values for token encryption/decryption to work
BETTER_AUTH_SECRET: test-only-not-a-real-better-auth-secret
OIDC_PROVIDER_ID: oidc
- name: Run Playwright tests
run: pnpm test:e2e
- name: Upload test artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
if: failure()
with:
name: playwright-report
path: |
test-results/
playwright-report/
retention-days: 7