diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 874a1f5f8..3ef1c4aa3 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -99,7 +99,7 @@ jobs: name: documentation-pdf path: doc/_build/latex/*.pdf retention-days: 7 - + - name: Extract the server logs if: always() run: | @@ -111,7 +111,7 @@ jobs: with: name: server_output_docs.txt path: server_output.txt - + - name: DPF Logs (on screen) if: always() run: | @@ -188,9 +188,46 @@ jobs: path: .cov/html retention-days: 7 + run-testing: + name: Test the "run" subpackage + runs-on: ubuntu-latest + needs: [code-style] + container: + image: ghcr.io/ansys/mechanical:24.1.0 + options: --entrypoint /bin/bash + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt update + apt install --reinstall ca-certificates + apt install software-properties-common git -y + add-apt-repository ppa:deadsnakes/ppa -y + apt install python3.11 python3.11-venv -y + python3.11 -m ensurepip --default-pip + python3.11 -m pip install --upgrade pip + python3.11 -m venv /env + + - name: Install library + run: | + . /env/bin/activate + pip install .[tests] + + - name: Unit testing + env: + ANSYSLI_SERVERS: 2325@${{secrets.LICENSE_SERVER}} + ANSYSLMD_LICENSE_FILE: 1055@${{secrets.LICENSE_SERVER}} + LSTC_LICENSE: ansys + run: | + . /env/bin/activate + save-ansys-path --name dyna /install/ansys_inc/v241/ansys/bin/linx64/lsdyna_dp.e + pytest -m run + build-library: name: "Build library" - needs: [doc, tests] + needs: [doc, tests, run-testing] runs-on: ubuntu-latest steps: - uses: ansys/actions/build-library@v8