Skip to content

Commit

Permalink
actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Căutișanu authored and Andrei Căutișanu committed Nov 6, 2024
1 parent 1fa8173 commit a69f2c5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
name: Install Local Version of Opik
name: Run Selected Suite

on:
push:
branches:
- andrei/projects-crud-tests
workflow_dispatch:
inputs:
suite:
type: choice
description: 'Choose which test suite to run'
required: true
default: 'projects-CRUD'
options:
- projects-CRUD

jobs:
test_installation:
e2e_sanity:
runs-on: ubuntu-20.04

steps:
Expand All @@ -31,23 +42,33 @@ jobs:
OPIK_USAGE_REPORT_ENABLED: false
run: |
cd ${{ github.workspace }}/deployment/docker-compose
docker compose up --detach
docker compose up -d --build
- name: Check Docker pods are up
run: |
chmod +x ./tests_end_to_end/installer/check_docker_compose_pods.sh
./tests_end_to_end/installer/check_docker_compose_pods.sh
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/check_backend.sh
./tests_end_to_end/installer/check_backend.sh
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/test_app_status.py
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/Projecs/test_projects_crud_operations.py --browser chromium --base-url http://localhost:5173 --setup-show
fi
- name: Stop Opik server
if: always()
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ jobs:
- name: Check Docker pods are up
run: |
chmod +x ./tests_end_to_end/installer/check_docker_compose_pods.sh
./tests_end_to_end/installer/check_docker_compose_pods.sh
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/check_backend.sh
./tests_end_to_end/installer/check_backend.sh
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/test_app_status.py
pytest -v -s ${{ github.workspace }}/tests_end_to_end/installer_utils/test_app_status.py
- name: Run sanity suite
run: |
cd ${{ github.workspace }}/tests_end_to_end
export PYTHONPATH='.'
pytest -s application_sanity/test_sanity.py --browser chromium --base-url http://localhost:5173 --setup-show
pytest -s tests/application_sanity/test_sanity.py --browser chromium --base-url http://localhost:5173 --setup-show
- name: Stop Opik server
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sdk-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
- name: Check Opik server availability
shell: bash
run: |
chmod +x ${{ github.workspace }}/tests_end_to_end/installer/*.sh
chmod +x ${{ github.workspace }}/tests_end_to_end/installer_utils/*.sh
cd ${{ github.workspace }}/deployment/docker-compose
echo "Check Docker pods are up"
${{ github.workspace }}/tests_end_to_end/installer/check_docker_compose_pods.sh
${{ github.workspace }}/tests_end_to_end/installer_utils/check_docker_compose_pods.sh
echo "Check backend health"
${{ github.workspace }}/tests_end_to_end/installer/check_backend.sh
${{ github.workspace }}/tests_end_to_end/installer_utils/check_backend.sh
- name: Install opik SDK
run: |
Expand Down

0 comments on commit a69f2c5

Please sign in to comment.