Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F00: Enable CI #486

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions tests/e2e/integration_tests/test_spiral_inductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,5 +422,6 @@ def create_adaptive_settings(self):


def test_spiral_inductor():
print("test_spiral_inductor", settings.server_exe_dir())
with session(settings.server_exe_dir(), 50051):
SpiralInductor().run(r"spiral_inductor.aedb")
1 change: 1 addition & 0 deletions tests/e2e/scratch/sim_setup_scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,5 +326,6 @@ def do_test():


def test_sim_setup():
print("test_sim_setup", settings.server_exe_dir())
with session(settings.server_exe_dir(), 50051):
do_test()
1 change: 1 addition & 0 deletions tests/e2e/scratch/test_board_bend_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ def do_test():


def test_board_bend_def():
print("test_board_bend_def", settings.server_exe_dir())
with session(settings.server_exe_dir(), 50051):
do_test()
1 change: 1 addition & 0 deletions tests/e2e/scratch/test_component_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,6 @@ def do_test():


def test_component_property():
print("test_component_property", settings.server_exe_dir())
with session(settings.server_exe_dir(), 50051):
do_test()
1 change: 1 addition & 0 deletions tests/e2e/scratch/test_power_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


def test_power_module():
print("test_power_module", settings.server_exe_dir())
session = launch_session(settings.server_exe_dir(), 50051)

db = Database.create(settings.temp_dir())
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/scratch/test_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@


def test_value():
print("test_value", settings.server_exe_dir())
session = launch_session(settings.server_exe_dir(), 50051)

db = Database.create(settings.temp_dir())
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
Loading