Skip to content

Commit

Permalink
add run tests to cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Koubaa committed Oct 29, 2024
1 parent dd1fad4 commit e740f5a
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
name: documentation-pdf
path: doc/_build/latex/*.pdf
retention-days: 7

- name: Extract the server logs
if: always()
run: |
Expand All @@ -111,7 +111,7 @@ jobs:
with:
name: server_output_docs.txt
path: server_output.txt

- name: DPF Logs (on screen)
if: always()
run: |
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e740f5a

Please sign in to comment.