diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index d7656595..261dd501 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -62,6 +62,17 @@ jobs: submodules: true path: rep-deployments + - uses: dawidd6/action-download-artifact@v2 + with: + workflow: main.yaml + name: docker-compose-internal + path: docker-compose-artifact/ + branch: main + repo: ansys-internal/rep-deployments + workflow_conclusion: success + search_artifacts: false + github_token: ${{secrets.PYANSYS_CI_BOT_TOKEN}} + - uses: KengoTODA/actions-setup-docker-compose@main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -75,12 +86,15 @@ jobs: - name: Start services run: | + ls -la + tar -xvzf docker-compose-internal.tar.gz + cd docker-compose FSGATEWAY_TAG=latest-dev JMS_TAG=latest-dev docker-compose pull FSGATEWAY_TAG=latest-dev JMS_TAG=latest-dev LOCALHOST_ADDR=localhost docker-compose up -d keycloak echo "Waiting a few sec ..." sleep 5 FSGATEWAY_TAG=latest-dev JMS_TAG=latest-dev LOCALHOST_ADDR=localhost docker-compose up -d - working-directory: ./rep-deployments/docker-compose + working-directory: ./docker-compose-artifact - name: Test with tox run: tox -e ${{ matrix.cfg.toxenv }}-noeval-coverage @@ -97,6 +111,12 @@ jobs: check_name: Test Report ${{ matrix.os }}:${{ matrix.cfg.python-version }} detailed_summary: true include_passed: true + + - name: Stop services + if: always() + run: | + docker-compose down -v + working-directory: ./docker-compose-artifact/docker-compose docs: name: Documentation diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4cd7c945..b9cf92f9 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -40,7 +40,7 @@ jobs: os: [ubuntu-latest] cfg: - {python-version: "3.7", toxenv: "py37"} - - {python-version: "3.10", toxenv: "py310"} + - {python-version: "3.11", toxenv: "py311"} fail-fast: false steps: @@ -53,13 +53,16 @@ jobs: run: | python -m pip install --upgrade pip setuptools tox tox-gh-actions - - name: Check out rep-deployments - uses: actions/checkout@v3 + - uses: dawidd6/action-download-artifact@v2 with: - repository: ansys-internal/rep-deployments - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - submodules: true - path: rep-deployments + workflow: main.yaml + name: docker-compose-internal + path: docker-compose-artifact/ + branch: main + repo: ansys-internal/rep-deployments + workflow_conclusion: success + search_artifacts: false + github_token: ${{secrets.PYANSYS_CI_BOT_TOKEN}} - uses: KengoTODA/actions-setup-docker-compose@main env: @@ -74,12 +77,15 @@ jobs: - name: Start services run: | + ls -la + tar -xvzf docker-compose-internal.tar.gz + cd docker-compose FSGATEWAY_TAG=latest-dev JMS_TAG=latest-dev docker-compose pull FSGATEWAY_TAG=latest-dev JMS_TAG=latest-dev LOCALHOST_ADDR=localhost docker-compose up -d keycloak echo "Waiting a few sec ..." sleep 5 FSGATEWAY_TAG=latest-dev JMS_TAG=latest-dev LOCALHOST_ADDR=localhost docker-compose up -d - working-directory: ./rep-deployments/docker-compose + working-directory: ./docker-compose-artifact - name: Test with tox run: tox -e ${{ matrix.cfg.toxenv }}-noeval-coverage @@ -95,6 +101,12 @@ jobs: report_paths: '**/test*.xml' check_name: Test Report ${{ matrix.os }}:${{ matrix.cfg.python-version }} + - name: Stop services + if: always() + run: | + docker-compose down -v + working-directory: ./docker-compose-artifact/docker-compose + end-to-end-tests: name: End-to-end tests runs-on: windows-latest diff --git a/tests/jms/test_projects.py b/tests/jms/test_projects.py index 5be2a935..47fda399 100644 --- a/tests/jms/test_projects.py +++ b/tests/jms/test_projects.py @@ -15,6 +15,7 @@ from examples.mapdl_motorbike_frame.project_setup import create_project as motorbike_create_project from marshmallow.utils import missing +from ansys.rep.client import __ansys_apps_version__ as ansys_version from ansys.rep.client.jms import JmsApi, ProjectApi from ansys.rep.client.jms.resource import JobDefinition, LicenseContext, Project from ansys.rep.client.jms.schema.project import ProjectSchema @@ -273,9 +274,11 @@ def test_copy_exec_script(self): proj = jms_api.create_project(proj) project_api = ProjectApi(client, proj.id) - file = project_api.copy_default_execution_script("exec_mapdl.py") - self.assertEqual(file.name, "exec_mapdl") - self.assertEqual(file.evaluation_path, "exec_mapdl.py") + ansys_short_version = f"v{ansys_version[2:4]}{ansys_version[6]}" + script_name = f"mapdl-{ansys_short_version}-exec_mapdl" + file = project_api.copy_default_execution_script(f"{script_name}.py") + self.assertEqual(file.name, script_name) + self.assertEqual(file.evaluation_path, f"{script_name}.py") self.assertIsNotNone(file.hash) self.assertIsNotNone(file.storage_id) diff --git a/tox.ini b/tox.ini index d1474df5..4b4f29eb 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,7 @@ basepython = py38: python3.8 py39: python3.9 py310: python3.10 + py311: python3.11 py: python3 {style,reformat,doc,build}: python3 passenv = REP_TEST_*