From 91a01042f5de44019c9c988d3316adebe3f49803 Mon Sep 17 00:00:00 2001 From: "Nir.Tal" Date: Sat, 15 Mar 2025 21:19:57 +0200 Subject: [PATCH 1/3] feat: update workflows --- .github/workflows/devRun.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/devRun.yml b/.github/workflows/devRun.yml index 904a403ed..e2c1f81c7 100644 --- a/.github/workflows/devRun.yml +++ b/.github/workflows/devRun.yml @@ -22,26 +22,24 @@ jobs: virtualenvs-create: true virtualenvs-in-project: true installer-parallel: true - virtualenvs-path: .venv + - name: Load cached virtual environment + id: cache-venv + uses: actions/cache@v4 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install Dependencies + if: steps.cache-venv.outputs.cache-hit != 'true' run: poetry install --no-interaction --no-root - name: Install Playwright Browsers run: | PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/') npx playwright@$PLAYWRIGHT_VERSION install --with-deps - - name: Test with pytest - run: | - source .venv/bin/activate - xvfb-run pytest -m devRun --base-url ${{ vars.BASE_URL }} - - name: Cache dependencies if tests pass - if: success() - uses: actions/cache/save@v4 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Run Playwright tests with pytest + run: poetry run xvfb-run pytest -m devRun --base-url ${{ vars.BASE_URL }} - name: Auto-assign reviewers - uses: kentaro-m/auto-assign-action@v2.0.0 if: success() + uses: kentaro-m/auto-assign-action@v2.0.0 - name: Store Playwright Traces and Videos From Failed Tests if: failure() uses: actions/upload-artifact@v4.6.1 From 794d19075052304cc38895136c00979e27c6213d Mon Sep 17 00:00:00 2001 From: "Nir.Tal" Date: Sat, 15 Mar 2025 21:37:33 +0200 Subject: [PATCH 2/3] feat: update workflows --- .github/workflows/nightly.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index cb51a51c1..50b41be4a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -62,8 +62,7 @@ jobs: npx playwright@$PLAYWRIGHT_VERSION install --with-deps - name: Run Tests run: | - source .venv/bin/activate - xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \ + poetry run xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \ --base-url ${{ vars.BASE_URL }} \ --splits ${{ github.event.inputs.parallelism || 2 }} \ --group ${{ matrix.group }} From 056cd3bf39d0281f23f29734459e76a7e3e0737f Mon Sep 17 00:00:00 2001 From: "Nir.Tal" Date: Sat, 15 Mar 2025 21:42:41 +0200 Subject: [PATCH 3/3] feat: update workflows --- .github/workflows/devRun.yml | 1 + .github/workflows/nightly.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/devRun.yml b/.github/workflows/devRun.yml index e2c1f81c7..bc79d1047 100644 --- a/.github/workflows/devRun.yml +++ b/.github/workflows/devRun.yml @@ -14,6 +14,7 @@ jobs: - uses: isort/isort-action@v1 - name: Set up Python uses: actions/setup-python@v5 + id: setup-python with: python-version: '3.12' - name: Install Poetry diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 50b41be4a..2a6239e3e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -38,6 +38,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 + id: setup-python with: python-version: '3.12' - name: Install Poetry