Skip to content

Commit

Permalink
Trying to run the e2e tox in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ritwik-g committed Jan 31, 2025
1 parent ba5c957 commit d3d91ed
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<details><summary>E2E Test Report</summary>" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
cat "e2e-report.md" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "</details>" >> $GITHUB_STEP_SUMMARY
fi
6 changes: 0 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit d3d91ed

Please sign in to comment.