Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
22 changes: 10 additions & 12 deletions .github/workflows/devRun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down