diff --git a/.github/workflows/ci-container-build.yaml b/.github/workflows/ci-container-build.yaml index bb555ec5d..d7b9823a0 100644 --- a/.github/workflows/ci-container-build.yaml +++ b/.github/workflows/ci-container-build.yaml @@ -49,3 +49,42 @@ jobs: exit 1 fi docker compose -f docker/docker-compose.yaml down -v + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Cache tox environments + uses: actions/cache@v4 + with: + path: .tox/ + key: ${{ runner.os }}-tox-${{ hashFiles('**/pyproject.toml', '**/tox.ini') }} + restore-keys: | + ${{ runner.os }}-tox- + + - name: Install tox + run: pip install tox + + - name: Run tox + id: tox + run: | + tox -e e2e + + - name: Render the report to the PR + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: e2e-test-report + recreate: true + path: e2e-report.md + + - name: Output reports to the job summary when tests fail + shell: bash + run: | + if [ -f "e2e-report.md" ]; then + echo "
E2E Test Report" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + cat "e2e-report.md" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "
" >> $GITHUB_STEP_SUMMARY + fi diff --git a/tox.ini b/tox.ini index eeee4bd9c..eb978d0d2 100644 --- a/tox.ini +++ b/tox.ini @@ -19,13 +19,7 @@ commands = pytest -v --md-report-verbose=1 --md-report --md-report-flavor gfm --md-report-output ../runner-report.md [testenv:e2e] -deps = pip -allowlist_externals= - sh commands_pre = pip install -r tests/e2e/requirements.txt - sh run-platform.sh -b - sleep 30 - docker compose -f docker/docker-compose.yaml ps -a commands = pytest -v --md-report-verbose=1 --md-report --md-report-flavor gfm --md-report-output ../e2e-report.md tests/e2e/