Skip to content

[QA] VizroAI UI tests #5

[QA] VizroAI UI tests

[QA] VizroAI UI tests #5

name: e2e tests for VizroAI UI
defaults:
run:
working-directory: vizro-ai
on:
push:
branches: [main]
pull_request:
branches:
- main
paths:
- "vizro-ai/**"
- "!vizro-ai/docs/**"
env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: "3.12"
jobs:
test-e2e-vizro-ai-ui-fork:
if: ${{ github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Passed fork step
run: echo "Success!"
test-e2e-vizro-ai-ui:
if: ${{ ! github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Hatch
run: pip install hatch
- name: Show dependency tree
run: hatch run pip tree
- name: Run e2e VizroAI UI tests
run: |
hatch run vizro-ai-ui
tests/tests_utils/wait-for-it.sh 127.0.0.1:8050 -t 30
hatch run test-e2e-vizro-ai-ui
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
- name: Create artifacts and slack notifications
if: failure()
uses: ./.github/actions/failed-artifacts-and-slack-notifications
env:
TESTS_NAME: e2e VizroAI UI tests
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
PROJECT_PATH: /home/runner/work/vizro/vizro/vizro-ai/