Skip to content

Revert "Skip failing fluid test on Linux" #2533

Revert "Skip failing fluid test on Linux"

Revert "Skip failing fluid test on Linux" #2533

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches-ignore:
- "*no-ci"
push:
branches:
- main
workflow_dispatch:
inputs:
standalone_branch_suffix:
description: 'Suffix of the branch on standalone'
required: false
default: ''
ansys_version:
description: "ANSYS version"
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
env:
PACKAGE_NAME: 'ansys-dpf-post'
MODULE: 'post'
DOCUMENTATION_CNAME: 'post.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.10'
jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: Show the Github context for the triggered event
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
style:
name: "Style Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: "Setup Python"
uses: actions/[email protected]
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: "Install pre-commit"
run: pip install pre-commit
- name: "Run pre-commit"
run: pre-commit run --all-files --show-diff-on-failure
vulnerabilities:
name: Vulnerabilities
runs-on: ubuntu-latest
steps:
- name: PyAnsys Vulnerability check (on main)
if: github.ref == 'refs/heads/main'
uses: ansys/actions/check-vulnerabilities@v10
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
- name: PyAnsys Vulnerability check (on dev mode)
if: github.ref != 'refs/heads/main'
uses: ansys/actions/check-vulnerabilities@v10
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
dev-mode: true
# tests:
# name: tests
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# os: ["windows-latest", "ubuntu-22.04"]
#
# steps:
# - uses: actions/checkout@v5
#
# - name: "Set licensing if necessary"
# if: ${{ (github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT) > '231' }}
# shell: bash
# run: |
# echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
# echo "ANSYSLMD_LICENSE_FILE=1055@${{ secrets.LICENSE_SERVER }}" >> $GITHUB_ENV
#
# - name: "Build Package"
# uses: ansys/pydpf-actions/[email protected]
# with:
# python-version: ${{ matrix.python-version }}
# ANSYS_VERSION: ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
# PACKAGE_NAME: ${{env.PACKAGE_NAME}}
# MODULE: ${{env.MODULE}}
# dpf-standalone-TOKEN: ${{secrets.PYANSYS_CI_BOT_TOKEN}}
# install_extras: graphics
# # Upload the wheel artifact for only one of the OS as it is OS-agnostic
# wheel: ${{ (matrix.python-version == env.MAIN_PYTHON_VERSION) && (matrix.os == 'windows-latest') }}
# wheelhouse: true
# standalone_suffix: ${{ inputs.standalone_suffix || ''}}
#
# - name: "Prepare Testing Environment"
# uses: ansys/pydpf-actions/[email protected]
# with:
# DEBUG: true
#
# - name: "List installed packages"
# shell: bash
# run: pip list
#
# - name: "Test Docstrings"
# uses: ansys/pydpf-actions/[email protected]
# if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
# with:
# MODULE: ${{env.MODULE}}
# PACKAGE_NAME: ${{env.PACKAGE_NAME}}
# working-directory: src
#
# - name: "Test API"
# shell: bash
# working-directory: tests
# run: |
# pytest $DEBUG --cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=junit/test-results.xml --reruns 2 .
#
# - name: "Kill all servers"
# uses: ansys/pydpf-actions/[email protected]
# if: always()
#
# - name: "Upload Test Results"
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ env.ANSYS_VERSION }}
# path: tests/junit/test-results.xml
#
# - name: "Upload coverage to Codecov"
# uses: codecov/codecov-action@v5
retro:
name: "Test DPF ${{ matrix.ANSYS_VERSION.version }}${{ matrix.ANSYS_VERSION.patch }} compatibility"
if: startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os: ["windows-latest", "ubuntu-22.04"]
ANSYS_VERSION:
- ${{ fromJson(vars.ANSYS_VERSIONS_RETRO_WITH_PATCH) }}
- ${{ fromJson(vars.ANSYS_VERSION_LAST_RELEASED_WITH_PATCH) }}
steps:
- uses: actions/checkout@v5
- name: "Set licensing if necessary"
if: matrix.ANSYS_VERSION.version > 231
shell: bash
run: |
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
echo "ANSYSLMD_LICENSE_FILE=1055@${{ secrets.LICENSE_SERVER }}" >> $GITHUB_ENV
- name: "Build Package"
uses: ansys/pydpf-actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
ANSYS_VERSION: ${{matrix.ANSYS_VERSION.version}}
PACKAGE_NAME: ${{env.PACKAGE_NAME}}
MODULE: ${{env.MODULE}}
dpf-standalone-TOKEN: ${{secrets.PYANSYS_CI_BOT_TOKEN}}
install_extras: graphics
wheel: false
standalone_suffix: ${{ matrix.ANSYS_VERSION.patch }}
- name: "Prepare Testing Environment"
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
with:
DEBUG: true
- name: "List installed packages"
shell: bash
run: pip list
- name: "Test: Remove gatebin"
shell: bash
run: |
DPF_PATH=`python -c "from ansys.dpf import core as dpf; import os; my_path = os.path.abspath(dpf.__file__); aux = my_path.split('/'); aux2 = aux[:-2]; print(''.join(aux2, '/'))"`
echo $DPF_PATH
- name: "Test API"
shell: bash
working-directory: tests
run: |
pytest $DEBUG --cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=junit/test-results.xml --reruns 2 .
- name: "Kill all servers"
uses: ansys/pydpf-actions/[email protected]
if: always()
- name: "Upload Test Results"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ matrix.ANSYS_VERSION.version }}${{ matrix.ANSYS_VERSION.patch }}
path: tests/junit/test-results.xml
if: always()
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5
# examples:
# if: startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
# uses: ./.github/workflows/examples.yml
# with:
# ANSYS_VERSION: ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
# python_versions: '["3.10"]'
# standalone_suffix: ${{ inputs.standalone_suffix || ''}}
# secrets: inherit#
# docs:
# if: startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
# uses: ./.github/workflows/docs.yml
# with:
# ANSYS_VERSION: ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
# python_version: "3.10"
# standalone_suffix: ${{ inputs.standalone_suffix || ''}}
# event_name: ${{ github.event_name }}
# secrets: inherit
#
# upload-development-docs:
# runs-on: ubuntu-latest
# if: ${{ github.ref == 'refs/heads/main' }}
# needs: [docs]
# steps:
# - name: "Upload development documentation"
# uses: ansys/actions/doc-deploy-dev@v10
# with:
# cname: ${{ env.DOCUMENTATION_CNAME }}
# token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
# bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
# bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
# doc-artifact-name: HTML-doc-ansys-dpf-post.zip
# decompress-artifact: true