-
Notifications
You must be signed in to change notification settings - Fork 227
78 lines (65 loc) · 2.71 KB
/
end2end_suites.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
68
69
70
71
72
73
74
75
76
77
78
name: Application E2E tests
on:
workflow_dispatch:
inputs:
suite:
type: choice
description: 'Choose which test suite to run'
required: true
default: 'projects-CRUD'
options:
- projects-CRUD
- traces-CRUD
jobs:
run_suite:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Opik
run: pip install ${{ github.workspace }}/sdks/python
- name: Install Test Dependencies
run: |
pip install -r ${{ github.workspace }}/tests_end_to_end/test_requirements.txt
playwright install
- name: Install Opik
env:
OPIK_USAGE_REPORT_ENABLED: false
run: |
cd ${{ github.workspace }}/deployment/docker-compose
docker compose up -d --build
- name: Check Docker pods are up
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
run: |
chmod +x ./tests_end_to_end/installer_utils/check_backend.sh
./tests_end_to_end/installer_utils/check_backend.sh
shell: bash
- name: Check app is up via the UI
run: |
pytest -v -s ${{ github.workspace }}/tests_end_to_end/installer_utils/test_app_status.py
- name: Run suite
run: |
SUITE="${{ github.event.inputs.suite || 'projects-CRUD' }}"
cd ${{ github.workspace }}/tests_end_to_end
export PYTHONPATH='.'
if [ "$SUITE" == "projects-CRUD" ]; then
pytest -s tests/Projects/test_projects_crud_operations.py --browser chromium --base-url http://localhost:5173 --setup-show
elif [ "$SUITE" == "traces-CRUD" ]; then
pytest -s tests/Traces/test_traces_crud_operations.py --browswer chromium --base-url http://localhost:5173 --setup-show
fi
- name: Stop Opik server
if: always()
run: |
cd ${{ github.workspace }}/deployment/docker-compose
docker compose down
cd -