Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/e2e_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: E2E tests

on:
workflow_dispatch:
inputs:
branch:
description: 'branch to run tests from, default: main'
required: false
type: string
environment:
type: choice
description: Environment
options:
- stage
- prod

env:
branch: ${{ inputs.branch || 'main' }}
ols_url: ${{ inputs.environment == 'stage' && 'https://stage.ai.ansible.redhat.com/chat' || 'https://c.ai.ansible.redhat.com/chat' }}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear reviewer, please consider this:

For the URLs here I used the ai connect chat urls but what we need here is the exposed urls of the chatbot service itself. if these current URLs give us what we need right now then it should be enough but otherwise for running the e2e tests as designed we need a route for each environment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is sth we can discuss only when @TamiTakamiya returns, what I suggest is: let's merge this PR and that way we will be able to merge: https://github.com/ansible/ansible-wisdom-ops/pull/1179 and https://github.com/ansible/ansible-wisdom-ops/pull/1180

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't expose the chatbot service to the public. so only though the wisdom-service


jobs:
test_schedule:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ env.branch }}
uses: actions/checkout@v3
with:
ref: ${{ env.branch }}

- name: Set up python3
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Python version
run: python --version

- name: PDM installation
run: pip install --user pdm

- name: Install dependencies
run: pdm install

- name: Install devel dependencies
run: pdm install --dev

- name: Run e2e tests
run: OLS_URL=${{ env.ols_url }} pdm run python -m pytest -m tests/e2e --doctest-modules --junitxml=junit/e2e-test-results.xml

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: junit/e2e-test-results.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ woke
benchmark_*.svg

# requirements file
requirements*
# requirements*
Loading
Loading