Skip to content

Merge pull request #32 from m4r1k/feat/voltage-sensitivity-preset #129

Merge pull request #32 from m4r1k/feat/voltage-sensitivity-preset

Merge pull request #32 from m4r1k/feat/voltage-sensitivity-preset #129

Workflow file for this run

name: E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
E2E_DIR: tests/e2e
# All third-party action invocations are SHA-pinned (with the
# corresponding tag in a comment) so a moved tag in the upstream
# action repo cannot silently change what runs in CI. Refresh
# periodically by re-running
# `gh api repos/<owner>/<repo>/git/refs/tags/<tag>` (or, for branch-
# tracked actions like pypa/gh-action-pypi-publish@release/v1,
# `gh api repos/<owner>/<repo>/branches/<branch>`) and updating both
# the SHA and the comment in lockstep across every workflow.
#
# Each E2E group runs as a separate matrix job so they execute in
# parallel. Total wall-clock is bounded by the slowest group instead
# of the previous ~6+ minute single sequential job.
#
# v5.1.2 split the previous `Redundancy and Stats` job into two
# (`Redundancy` runs tests 21-27, `Stats` runs tests 28-32) so the
# heaviest group no longer gates the matrix on its own.
#
# OPERATOR ACTION REQUIRED when this PR's branch protection updates:
# the required checks on `main` are now FIVE E2E jobs (was four).
# Drop `E2E Redundancy and Stats`; add `E2E Redundancy` and `E2E Stats`.
# The validate matrix (×6) is unchanged. Total required checks: 11.
# - E2E CLI
# - E2E UPS Single
# - E2E UPS Multi
# - E2E Redundancy
# - E2E Stats
jobs:
e2e:
name: "E2E ${{ matrix.label }}"
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- { group: cli, label: "CLI" }
- { group: single-ups, label: "UPS Single" }
- { group: multi-ups, label: "UPS Multi" }
- { group: redundancy, label: "Redundancy" }
- { group: stats, label: "Stats" }
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up E2E environment
uses: ./.github/actions/e2e-setup
with:
e2e-dir: ${{ env.E2E_DIR }}
- name: "Run E2E group: ${{ matrix.label }}"
run: bash tests/e2e/groups/${{ matrix.group }}.sh
- name: Collect logs on failure
if: failure()
run: |
echo "=== Docker Compose Logs ==="
cd ${{ env.E2E_DIR }}
docker compose logs
echo ""
echo "=== Eneru Test Logs ==="
cat /tmp/test*.log 2>/dev/null || echo "No test logs found"
- name: Cleanup
if: always()
run: |
cd ${{ env.E2E_DIR }}
docker compose down -v --remove-orphans
sudo umount /tmp/eneru-e2e-tmpfs 2>/dev/null || true