-
Notifications
You must be signed in to change notification settings - Fork 1.7k
151 lines (129 loc) · 4.78 KB
/
Copy pathend2end_suites_v2.yml
File metadata and controls
151 lines (129 loc) · 4.78 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Application E2E Tests (v2)
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
ALLURE_JOB_RUN_ID: ${{ github.event.inputs.ALLURE_JOB_RUN_ID }}
ALLURE_ENDPOINT: https://comet.testops.cloud/
ALLURE_PROJECT_ID: 1
ALLURE_RESULTS: allure-results
# The sdk-driver service runs the SDK outside pytest for the whole suite, so
# without this its traffic would land in the usage analytics as a real user's.
OPIK_ANALYTICS_ENABLE: false
OPIK_SENTRY_ENABLE: false
on:
workflow_dispatch:
inputs:
tier:
type: choice
description: 'Which tag tier to run'
required: true
default: 't1'
options:
- t1
- t2
- t3
ALLURE_JOB_RUN_ID:
description: ALLURE_JOB_RUN_ID service parameter. Leave blank.
ALLURE_USERNAME:
description: ALLURE_USERNAME service parameter. Leave blank.
pull_request:
paths:
- 'sdks/code_generation/fern/openapi/openapi.yaml'
- 'tests_end_to_end/e2e/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
run-name: Application E2E Tests (v2) - ${{ github.event.inputs.tier || 't1' }}
permissions:
contents: read
jobs:
run_suite:
name: "Run v2 suite: ${{ github.event.inputs.tier || 't1' }}"
runs-on: ubuntu-latest
timeout-minutes: 30
env:
OPIK_DEPLOYMENT: oss
OPIK_BASE_URL: http://localhost:5173
OPIK_WORKSPACE: default
WORKERS: 2
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
steps:
- name: Checkout repo
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tests_end_to_end/e2e/package-lock.json
- name: Setup uv & Python
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: '3.12'
- name: Install E2E test dependencies
working-directory: ${{ github.workspace }}/tests_end_to_end/e2e
run: |
npm ci
npx playwright install --with-deps chromium
- name: Sync bridge dependencies
working-directory: ${{ github.workspace }}/tests_end_to_end/e2e/services/opik-sdk-driver
run: uv sync
- name: Install allurectl
uses: allure-framework/setup-allurectl@v1
- name: Install Opik (Local)
env:
OPIK_USAGE_REPORT_ENABLED: false
# Avoid Buildx Bake concurrent image export collisions in CI.
COMPOSE_BAKE: false
run: |
cd ${{ github.workspace }}
TOGGLE_WELCOME_WIZARD_ENABLED="false" ./opik.sh --build
- name: Check Docker pods are up (Local)
run: |
chmod +x ./tests_end_to_end/installer_utils/check_docker_compose_pods.sh
./tests_end_to_end/installer_utils/check_docker_compose_pods.sh
shell: bash
- name: Check backend health (Local)
run: |
chmod +x ./tests_end_to_end/installer_utils/check_backend.sh
./tests_end_to_end/installer_utils/check_backend.sh
shell: bash
- name: Run v2 E2E suite
working-directory: ${{ github.workspace }}/tests_end_to_end/e2e
env:
TIER: ${{ github.event.inputs.tier || 't1' }}
ALLURE_LAUNCH_NAME: "Opik v2 E2E ${{ github.event.inputs.tier || 't1' }} - ${{ github.run_id }}"
# The dockerized backend reaches the host-run mock token service via the docker0 host IP
MOCK_AUTH_URL_FOR_BACKEND: http://172.17.0.1:9878
run: |
# Point both the allure-playwright reporter and allurectl at the same
# absolute results dir, then stream results to TestOps via allurectl watch.
export ALLURE_RESULTS="${{ github.workspace }}/tests_end_to_end/e2e/allure-results"
allurectl watch -- npm run "test:${TIER}"
- name: Upload Allure Results
if: always()
uses: actions/upload-artifact@v7
with:
name: allure-results-v2
path: tests_end_to_end/e2e/allure-results
retention-days: 7
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-report-v2
path: tests_end_to_end/e2e/playwright-report
retention-days: 7
- name: Upload Test Results (traces, videos)
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-v2
path: tests_end_to_end/e2e/test-results
retention-days: 7
- name: Stop Opik server (Local)
if: always()
run: |
cd ${{ github.workspace }}
./opik.sh --stop
continue-on-error: ${{ github.event_name == 'pull_request' }}