Linux_CPython_UnitTests #553
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux_CPython_UnitTests | |
env: | |
python.version: '3.10' | |
python.venv: 'testvenv' | |
# Following env vars when changed will "reset" the mentioned cache, | |
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-... | |
# You should go up in number, if you go down (or repeat a previous value) | |
# you might end up reusing a previous cache if it haven't been deleted already. | |
# It applies 7 days retention policy by default. | |
RESET_PIP_CACHE: 0 | |
PACKAGE_NAME: PyAEDT | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Linux CPython daily' | |
schedule: # UTC at 0100 | |
- cron: '0 1 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: [Linux, pyaedt] | |
strategy: | |
matrix: | |
python-version: [ '3.10' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x86' | |
- name: 'Install pyaedt' | |
run: | | |
python -m venv .pyaedt_test_env | |
export ANSYSEM_ROOT232=/apps/AnsysEM/v232/Linux64 | |
export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .pyaedt_test_env/bin/activate | |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U | |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U | |
python -c "import sys; print(sys.executable)" | |
pip install .[tests] | |
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pytest-azurepipelines | |
python -c "import pyaedt; print('Imported pyaedt')" | |
- name: 'Unit testing' | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
retry_on: error | |
timeout_minutes: 60 | |
command: | | |
export ANS_NODEPCHECK=1 | |
export ANSYSEM_ROOT232=/apps/AnsysEM/v232/Linux64 | |
export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .pyaedt_test_env/bin/activate | |
pytest --tx 6*popen --durations=50 --dist loadfile -v _unittest | |
- name: 'Unit testing Solvers' | |
continue-on-error: true | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
retry_on: error | |
timeout_minutes: 60 | |
command: | | |
export ANS_NODEPCHECK=1 | |
export ANSYSEM_ROOT232=/apps/AnsysEM/v232/Linux64 | |
export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .pyaedt_test_env/bin/activate | |
pytest --tx 2*popen --durations=50 --dist loadfile -v _unittest_solvers | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pytest-results | |
path: junit/test-results.xml | |
if: ${{ always() }} |