File tree Expand file tree Collapse file tree 2 files changed +63
-1
lines changed
Expand file tree Collapse file tree 2 files changed +63
-1
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ echo $GH_PAT | docker login -u $GH_USERNAME --password-stdin docker.pkg.github.c
33docker pull $MAPDL_IMAGE
44docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER --restart always --name mapdl -p $PYMAPDL_PORT :50052 $MAPDL_IMAGE -smp > log.txt &
55grep -q ' Server listening on' <( timeout 60 tail -f log.txt)
6- python -c " from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
6+ # python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
Original file line number Diff line number Diff line change 1+ name : GitHub Actions
2+
3+ on :
4+ push :
5+ pull_request :
6+ workflow_dispatch :
7+ schedule : # UTC at 0400
8+ - cron : ' 0 4 * * *'
9+
10+ env :
11+ PYMAPDL_PORT : 32771 # default won't work on azure
12+ PYMAPDL_START_INSTANCE : FALSE
13+ PYANSYS_OFF_SCREEN : True
14+
15+ jobs :
16+
17+ check_image :
18+ name : Validate latest mapdl image
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v2
22+
23+ - name : Install OS packages
24+ run : |
25+ sudo apt update
26+ sudo apt install libgl1-mesa-glx xvfb
27+
28+ - name : Cache pip
29+ uses : actions/cache@v2
30+ with :
31+ path : ~/.cache/pip
32+ key : Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements_*.txt') }}
33+ restore-keys : |
34+ Python-${{ runner.os }}-${{ matrix.python-version }}
35+
36+ - name : Install ansys-mapdl-core
37+ run : |
38+ pip install .
39+ cd tests
40+ xvfb-run python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"
41+
42+ - name : Log in to github registry
43+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
44+
45+ - name : Pull image
46+ run : |
47+ docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER --restart always --name mapdl -p $PYMAPDL_PORT:50052 ghcr.io/pyansys/mapdl -smp > log.txt &
48+ grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
49+ python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
50+ env :
51+ LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
52+
53+ - name : Unit Testing
54+ run : |
55+ pip install -r requirements_test.txt
56+ pip install pytest-azurepipelines
57+ xvfb-run pytest -v --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
58+
59+ - name : Display MAPDL Logs
60+ if : always()
61+ run : cat log.txt
62+
You can’t perform that action at this time.
0 commit comments