Application E2E Tests (v2) - t1 #323
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' }} |