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

ci: adding ubuntu 251 and 252 #3626

Merged
merged 12 commits into from
Dec 19, 2024
3 changes: 3 additions & 0 deletions .ci/build_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ versions=(
# if added more "latest", change "$LATEST"
'latest-ubuntu'
'latest-ubuntu-student'
'v25.2.0'
'v25.1.0'
'v25.1-ubuntu'
'v25.1-ubuntu-student'
'v24.2.0'
'v24.2-ubuntu'
'v24.2-ubuntu-student'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
PACKAGE_NAME: 'ansys-mapdl-core'
PACKAGE_NAMESPACE: 'ansys.mapdl.core'
DOCUMENTATION_CNAME: 'mapdl.docs.pyansys.com'
LATEST_VERSION: "242"
LATEST_VERSION: "252"
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.2-ubuntu-student
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
Expand All @@ -33,7 +33,7 @@ env:
DPF_PORT: 21004
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
ON_CI: True
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=40'
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180'

BUILD_CHEATSHEET: True
PYMAPDL_DEBUG_TESTING: True
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/3626.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: adding ubuntu 251 and 252
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pymapdl_convert_script = "ansys.mapdl.core.cli:old_pymapdl_convert_script_entry_
pymapdl = "ansys.mapdl.core.cli:main"

[tool.pytest.ini_options]
addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10 --timeout=40"
addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10 --timeout=180"
junit_family = "legacy"
filterwarnings = [
"ignore::FutureWarning",
Expand Down
8 changes: 5 additions & 3 deletions tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
from ansys.mapdl.core.misc import random_string
from conftest import ON_CI, TestClass

SKIP_ON_VERSIONS = ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1", "25.2"]


@pytest.fixture(scope="session")
def db(mapdl):
Expand All @@ -49,9 +51,9 @@ def db(mapdl):
)

## Exceptions
if mapdl_version in ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1"] and ON_CI:
if mapdl_version in SKIP_ON_VERSIONS and ON_CI:
pytest.skip(
f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does."
f"This MAPDL version ({mapdl_version}) docker image seems to not support DB on CICD."
)

if mapdl._server_version < (0, 4, 1): # 2021R2
Expand Down Expand Up @@ -84,7 +86,7 @@ def test_database_start_stop(mapdl, cleared):
)

# Exceptions
if mapdl_version in ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1"] and ON_CI:
if mapdl_version in SKIP_ON_VERSIONS and ON_CI:
pytest.skip(
f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does."
)
Expand Down
17 changes: 14 additions & 3 deletions tests/test_dpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import pytest

from conftest import HAS_DPF, has_dependency, requires
from conftest import HAS_DPF, ON_CI, has_dependency, requires

if not has_dependency("ansys-dpf-core") or not HAS_DPF:
pytest.skip(allow_module_level=True)
Expand All @@ -36,9 +36,20 @@
DPF_PORT = os.environ.get("DPF_PORT", DPF_DEFAULT_PORT) # Set in ci.yaml


@pytest.fixture()
def skip_dpf(mapdl):
mapdl_version = str(mapdl.version)
if mapdl_version in ["25.2"] and ON_CI:
pytest.skip(
f"This MAPDL version ({mapdl_version}) docker image seems to not support DPF on CICD.",
allow_module_level=True,
)
return


@requires("dpf")
@requires("ansys-dpf-core")
def test_dpf_connection():
def test_dpf_connection(skip_dpf):
# uses 127.0.0.1 and port 50054 by default
try:
grpc_con = dpf.connect_to_server(port=DPF_PORT)
Expand All @@ -50,7 +61,7 @@ def test_dpf_connection():

@requires("dpf")
@requires("ansys-dpf-core")
def test_upload(mapdl, solved_box, tmpdir):
def test_upload(skip_dpf, mapdl, solved_box, tmpdir):
# Download RST file
rst_path = mapdl.download_result(str(tmpdir.mkdir("tmpdir")))

Expand Down
Loading