Skip to content

Commit

Permalink
👷 [#99] Add end-to-end tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Sep 21, 2023
1 parent 974e8c1 commit 4e76a22
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,26 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: reports/

e2e_tests:
runs-on: ubuntu-latest
name: Run the end-to-end tests

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install tox tox-gh-actions pytest-playwright
playwright install --with-deps
- name: Run tests
run: tox -e e2e

- name: Publish coverage report
uses: codecov/codecov-action@v3
with:
directory: reports/
16 changes: 15 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,21 @@ deps =
django42: Django~=4.2.0
commands =
pytest tests \
--junitxml=reports/junit.xml \
-m 'not e2e' \
--cov --cov-report xml:reports/coverage-{envname}.xml \
{posargs}

[testenv:e2e]
setenv =
DJANGO_SETTINGS_MODULE=testapp.settings
PYTHONPATH={toxinidir}
extras =
tests
coverage
deps =
Django~=4.2.0
commands =
pytest tests \
--cov --cov-report xml:reports/coverage-{envname}.xml \
{posargs}

Expand Down

0 comments on commit 4e76a22

Please sign in to comment.