Skip to content

Commit

Permalink
FEATURE: Enable end to end testing
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchienjacklin committed Feb 11, 2025
1 parent e5b1354 commit 3259b4e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
PACKAGE_NAME: 'ansys-edb-core'
DOCUMENTATION_CNAME: 'edb.core.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.10'
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -80,6 +81,28 @@ jobs:
# Only the tox environment specified in the tox.ini gh-actions is run
run: tox -e test -- --ignore=tests/e2e

tests-e2e:
name: End to end tests and coverage
runs-on: [ self-hosted, Windows, pyedb-core ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade .[tests]
python -m pip install --upgrade tox-gh-actions
- name: Test with tox
# Only the tox environment specified in the tox.ini gh-actions is run
run: |
~/start.bat
tox -e test -- tests/e2e
~/stop.bat
doc-build:
name: "Doc build"
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ install_command =
description = Checks for project unit tests
setenv =
PYTEST_EXTRA_ARGS = --junitxml=junit/test-results.xml
ANSYSEM_EDB_EXE_DIR = {env:ANSYSEM_ROOT251}
commands =
python -m pip install .[tests]
pytest {posargs} {env:PYTEST_EXTRA_ARGS:}
pytest {posargs} {env:PYTEST_EXTRA_ARGS:ANSYSEM_EDB_EXE_DIR}

[testenv:coverage]
description = Checks for project unit tests and coverage
Expand Down

0 comments on commit 3259b4e

Please sign in to comment.