Skip to content

Commit 7e4941f

Browse files
authored
Add manually triggered workflow for testing of pydpf-post (#389)
1 parent 69274c3 commit 7e4941f

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/pydpf-post.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: PyDPF-Post testing
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
PyDPF-Post_branch:
7+
description: 'PyDPF-Post branch to test'
8+
required: true
9+
default: 'master'
10+
type: string
11+
12+
env:
13+
PACKAGE_NAME: ansys-dpf-core
14+
MODULE: core
15+
ANSYS_VERSION: 222
16+
17+
jobs:
18+
Clone_and_Test:
19+
name: Clone and Test
20+
runs-on: windows-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: "Setup Python"
26+
uses: actions/[email protected]
27+
with:
28+
python-version: "3.8"
29+
30+
- name: "Build Core Package"
31+
uses: pyansys/pydpf-actions/[email protected]
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
ANSYS_VERSION: ${{env.ANSYS_VERSION}}
35+
PACKAGE_NAME: ${{env.PACKAGE_NAME}}
36+
MODULE: ${{env.MODULE}}
37+
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
38+
install_extras: plotting
39+
wheelhouse: false
40+
extra-pip-args: ${{ env.extra }}
41+
42+
- name: "Clone PyDPF-Post"
43+
run: |
44+
$BranchName = ${{ inputs.PyDPF-Post_branch }}
45+
git clone --branch $BranchName --single-branch https://${{secrets.pydpf-post-TOKEN}}@github.com/pyansys/pydpf-post
46+
shell: pwsh
47+
48+
- name: "Install PyDPF-Post"
49+
run: |
50+
cd pydpf-post/
51+
pip install .
52+
shell: pwsh
53+
54+
- name: "Prepare Testing Environment"
55+
uses: pyansys/pydpf-actions/[email protected]
56+
with:
57+
DEBUG: true
58+
59+
- name: "Test Docstrings"
60+
uses: pyansys/pydpf-actions/[email protected]
61+
with:
62+
MODULE: post
63+
PACKAGE_NAME: ansys-dpf-post
64+
65+
- name: "Test API"
66+
shell: bash
67+
working-directory: tests
68+
run: |
69+
pytest $DEBUG --cov=ansys.dpf.post --cov-report=xml --cov-report=html --log-level=ERROR --junitxml=junit/test-results-post.xml --reruns 2 .
70+
71+
- name: "Kill all servers"
72+
uses: pyansys/pydpf-actions/[email protected]
73+
74+
- name: "Upload Test Results"
75+
uses: actions/upload-artifact@v2
76+
with:
77+
name: ansys-dpf-post_pytest
78+
path: tests/junit/test-results-post.xml

0 commit comments

Comments
 (0)