split tests into half

This commit is contained in:
Khaleel Al-Adhami 2024-11-05 17:12:31 -08:00
parent 41770043a1
commit 91779579b1

View File

@ -6,13 +6,13 @@ concurrency:
on: on:
push: push:
branches: ['main'] branches: ["main"]
paths-ignore: paths-ignore:
- '**/*.md' - "**/*.md"
pull_request: pull_request:
branches: ['main'] branches: ["main"]
paths-ignore: paths-ignore:
- '**/*.md' - "**/*.md"
permissions: permissions:
contents: read contents: read
@ -22,8 +22,9 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
strategy: strategy:
matrix: matrix:
state_manager: ['redis', 'memory'] state_manager: ["redis", "memory"]
python-version: ['3.11.5', '3.12.0'] split_index: [0, 1]
python-version: ["3.11.5", "3.12.0"]
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
services: services:
# Label used to access the service container # Label used to access the service container
@ -45,14 +46,14 @@ jobs:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
run-poetry-install: true run-poetry-install: true
create-venv-at-path: .venv create-venv-at-path: .venv
- run: poetry run uv pip install pyvirtualdisplay pillow - run: poetry run uv pip install pyvirtualdisplay pillow pytest-split
- name: Run app harness tests - name: Run app harness tests
env: env:
SCREENSHOT_DIR: /tmp/screenshots SCREENSHOT_DIR: /tmp/screenshots
REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }} REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }}
run: | run: |
poetry run playwright install --with-deps poetry run playwright install --with-deps
poetry run pytest tests/integration poetry run pytest tests/integration --split-index=${{matrix.split_index}}--split-total=2
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
name: Upload failed test screenshots name: Upload failed test screenshots
if: always() if: always()