Skip to content

Commit

Permalink
Allowing extended testing on dispatch (optional) and schedule (#2312)
Browse files Browse the repository at this point in the history
* Allowing extended testing on dispatch (optional) and schedule

* Removing repeated symbols

* Adding env var to us shm

* adding -e I_MPI_SHM_LMT=shm to the script launcher

* Making test compatible with older MAPDL versions

* Making test compatible with older MAPDL versions

* Removing env var from yaml
  • Loading branch information
germa89 authored Sep 7, 2023
1 parent 7b8c6b6 commit a2d1951
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ci/start_mapdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docker run \
-p $PYMAPDL_PORT:50052 \
-p $PYMAPDL_DB_PORT:50055 \
--shm-size=1gb \
-e I_MPI_SHM_LMT=shm \
$MAPDL_IMAGE \
-$DISTRIBUTED_MODE -np 2 > log.txt &
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
1 change: 1 addition & 0 deletions .ci/start_mapdl_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ docker run \
-p $PYMAPDL_PORT:50052 \
-p $PYMAPDL_DB_PORT:50055 \
--shm-size=1gb \
-e I_MPI_SHM_LMT=shm \
-w /jobs \
-u=0:0 \
$MAPDL_IMAGE /ansys_inc/v222/ansys/bin/mapdl -grpc -dir /jobs -$DISTRIBUTED_MODE -np 2 > log.txt &
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: CI
on:
pull_request:
workflow_dispatch:
inputs:
run_all_tests:
description: 'Run all extended MAPDL build tests'
required: true
type: boolean

push:
tags:
- "*"
Expand Down Expand Up @@ -246,14 +252,14 @@ jobs:
build-test:
name: "Remote: Build and unit testing"
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
mapdl-version: ['v21.1.1', 'v21.2.1', 'v22.1.0', 'v22.2.0', 'v22.2-ubuntu', 'v23.1.0', 'v23.2.0', 'v24.1.0']
extended_testing:
- ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }}
- ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }}
exclude:
- extended_testing: false
mapdl-version: 'v21.1.1'
Expand Down
3 changes: 2 additions & 1 deletion tests/test_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@ def test_n_cg_iter(mapdl):

def test_solution_call(mapdl):
mapdl.finish()
assert "MAPDL SOLUTION ROUTINE" in mapdl.solution()
output = mapdl.solution()
assert "MAPDL SOLUTION ROUTINE" in output or "ANSYS SOLUTION ROUTINE" in output

0 comments on commit a2d1951

Please sign in to comment.