From 5af120c013a25376b1e0d10198cf7c8d2f8886d5 Mon Sep 17 00:00:00 2001 From: c8y3 <25362953+c8y3@users.noreply.github.com> Date: Wed, 3 Jan 2024 12:50:09 +0100 Subject: [PATCH] Playwright js end to end test with a python version --- .github/workflows/ci.yml | 14 +++++++------- validation/graylog.py | 4 ++-- validation/test.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa0b903..2a3daed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,14 +75,14 @@ jobs: node-version: 18 cache: 'npm' cache-dependency-path: plugin/end_to_end/package-lock.json - - name: Install dependencies - working-directory: plugin/end_to_end - run: | - npm ci - npx playwright install chromium - name: Run Playwright tests - working-directory: plugin/end_to_end - run: npx playwright test + working-directory: plugin/validation/end_to_end + run: | + python -m venv venv + source venv/bin/activate + pip install -r requirements.txt + docker-compose --project-directory ../../runtime pull + PYTHONPATH=.. pytest - uses: actions/upload-artifact@v3 if: always() with: diff --git a/validation/graylog.py b/validation/graylog.py index 5689890..c24d6b7 100644 --- a/validation/graylog.py +++ b/validation/graylog.py @@ -7,8 +7,8 @@ class Graylog: - def __init__(self): - self._server = GraylogServer('../runtime') + def __init__(self, docker_compose_path): + self._server = GraylogServer(docker_compose_path) self._api = GraylogRestApi() def _wait(self, condition, attempts, sleep_duration=1): diff --git a/validation/test.py b/validation/test.py index 95220e9..a1ba9c3 100644 --- a/validation/test.py +++ b/validation/test.py @@ -20,7 +20,7 @@ class Test(TestCase): def setUp(self) -> None: - self._graylog = Graylog() + self._graylog = Graylog('../runtime') self._graylog.start() def tearDown(self) -> None: