feat: add bench diagnostics #146
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E (Admin UI) | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Heavy (bench init clones the framework); allow manual runs too. | |
| workflow_dispatch: | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 90 | |
| name: e2e (${{ matrix.variant }}) | |
| strategy: | |
| # Variants run as independent jobs in parallel, so adding one doesn't add | |
| # wall-clock time. Don't cancel the others if one fails. | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Dev bench on the shared system MariaDB; exercises app install/uninstall. | |
| - variant: shared | |
| db_type: mariadb | |
| db_mode: shared | |
| volumes: "0" | |
| extra_app: "1" | |
| # The production shape: a dedicated per-bench MariaDB instance with ZFS | |
| # volumes. Skips the extra-app step (covered by `shared`) to stay quick. | |
| - variant: dedicated-zfs | |
| db_type: mariadb | |
| db_mode: dedicated | |
| volumes: "1" | |
| extra_app: "0" | |
| # PostgreSQL bench on the shared system server; exercises app | |
| # install/uninstall on the postgres engine end to end. | |
| - variant: postgres | |
| db_type: postgres | |
| db_mode: shared | |
| volumes: "0" | |
| extra_app: "1" | |
| # PostgreSQL with a dedicated per-bench cluster (pg_createcluster); the | |
| # dedicated counterpart of the shared-server postgres variant. Skips the | |
| # extra-app step (covered by `postgres`) to stay quick. | |
| - variant: postgres-dedicated | |
| db_type: postgres | |
| db_mode: dedicated | |
| volumes: "0" | |
| extra_app: "0" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Install common system dependencies | |
| run: | | |
| # Runners preconfigure Microsoft apt repos that intermittently 403; | |
| # they aren't needed here and otherwise fail the whole apt-get update. | |
| sudo rm -f /etc/apt/sources.list.d/microsoft*.list /etc/apt/sources.list.d/azure*.list | |
| sudo apt-get update -y | |
| sudo apt-get install -y redis-server git nginx openssl | |
| sudo systemctl start redis-server | |
| - name: Install MariaDB | |
| if: matrix.db_type == 'mariadb' | |
| run: | | |
| sudo apt-get install -y mariadb-server | |
| sudo systemctl start mariadb | |
| # The setup wizard validates "shared system MariaDB" against this. | |
| sudo mysql -e "SET PASSWORD FOR root@localhost = PASSWORD('admin'); FLUSH PRIVILEGES;" | |
| - name: Install PostgreSQL | |
| if: matrix.db_type == 'postgres' | |
| run: | | |
| sudo apt-get install -y postgresql postgresql-client | |
| sudo systemctl start postgresql | |
| # The setup wizard validates PostgreSQL against this superuser password. | |
| sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'admin';" | |
| - name: Install ZFS | |
| if: matrix.volumes == '1' | |
| # The dedicated+ZFS variant provisions a disk-image-backed pool, so it | |
| # needs the ZFS userland + kernel module. | |
| run: | | |
| sudo apt-get install -y zfsutils-linux | |
| sudo modprobe zfs | |
| zpool list || true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install yarn, bench and e2e deps | |
| run: | | |
| npm install -g yarn | |
| pip install -e ".[test,admin,e2e]" | |
| - name: Cache admin frontend node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: admin/frontend/node_modules | |
| key: admin-npm-${{ runner.os }}-${{ hashFiles('admin/frontend/package-lock.json') }} | |
| - name: Install admin frontend deps | |
| # The harness builds the admin UI from source (E2E_BUILD_ADMIN below) | |
| # around the bench lifecycle, so it just needs node_modules. | |
| working-directory: admin/frontend | |
| run: npm install | |
| - name: Cache Playwright browser | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('pyproject.toml') }} | |
| - name: Install Playwright browser | |
| run: playwright install --with-deps chromium | |
| - name: Run e2e tests | |
| working-directory: tests/e2e | |
| # BENCH_BIN is intentionally unset so the harness uses the repo launcher | |
| # (<repo>/bench), which writes to <repo>/benches where the harness reads. | |
| run: pytest | |
| env: | |
| E2E_MARIADB_PASSWORD: admin | |
| E2E_POSTGRES_PASSWORD: admin | |
| # CI validates this branch's frontend, so build the admin UI from source. | |
| E2E_BUILD_ADMIN: "1" | |
| E2E_DB_TYPE: ${{ matrix.db_type }} | |
| E2E_DB_MODE: ${{ matrix.db_mode }} | |
| E2E_VOLUMES: ${{ matrix.volumes }} | |
| E2E_EXTRA_APP: ${{ matrix.extra_app }} | |
| - name: Upload Playwright traces | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-traces-${{ matrix.variant }} | |
| path: tests/e2e/test-results | |
| retention-days: 7 |