2121 ANSYS_VERSION : 222
2222
2323jobs :
24- Style_Check :
24+ style :
2525 name : Style Check
26- runs-on : ubuntu-20.04
26+ runs-on : ubuntu-latest
2727 steps :
2828 - uses : actions/checkout@v3
29-
30- - name : " Setup Python"
29+ - name : Setup Python
31303231 with :
33- python-version : 3.8
34-
35- - name : " Install style requirements"
36- run : |
37- pip install -r requirements/requirements_style.txt --disable-pip-version-check
38-
39- - name : " Codespell"
40- run : |
41- make codespell
42-
43- - name : " flake8"
44- run : |
45- make flake8
32+ python-version : 3.9
33+ - name : Install pre-commit
34+ run : pip install pre-commit
35+ - name : Run pre-commit
36+ run : pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
4637
47- Build_and_Test :
38+ build_test :
4839 name : Build and Test
4940 runs-on : ${{ matrix.os }}
5041 strategy :
5142 fail-fast : false
5243 matrix :
53- python-version : ["3.7"]
44+ python-version : ["3.7", "3.8", "3.9", "3.10" ]
5445 os : ["windows-latest", "ubuntu-latest"]
5546
5647 steps :
5748 - uses : actions/checkout@v3
5849
5950 - name : " Build Package"
60- uses : pyansys/pydpf-actions/build_package@v2.2.dev1
51+ uses : pyansys/pydpf-actions/build_package@feat/use_build
6152 with :
6253 python-version : ${{ matrix.python-version }}
6354 ANSYS_VERSION : ${{env.ANSYS_VERSION}}
@@ -68,12 +59,12 @@ jobs:
6859 wheelhouse : true
6960
7061 - name : " Prepare Testing Environment"
71- uses : pyansys/pydpf-actions/prepare_tests@v2.2.dev1
62+ uses : pyansys/pydpf-actions/prepare_tests@feat/use_build
7263 with :
7364 DEBUG : true
7465
7566 - name : " Test Docstrings"
76- uses : pyansys/pydpf-actions/test_docstrings@v2.2.dev1
67+ uses : pyansys/pydpf-actions/test_docstrings@feat/use_build
7768 with :
7869 MODULE : ${{env.MODULE}}
7970 PACKAGE_NAME : ${{env.PACKAGE_NAME}}
8576 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 .
8677
8778 - name : " Kill all servers"
88- uses : pyansys/pydpf-actions/kill-dpf-servers@v2.2.dev1
79+ uses : pyansys/pydpf-actions/kill-dpf-servers@feat/use_build
8980 if : always()
9081
9182 - name : " Upload Test Results"
@@ -97,85 +88,30 @@ jobs:
9788 - name : " Upload coverage to Codecov"
9889 uses : codecov/codecov-action@v3
9990
100- Documentation :
91+ docs :
10192 name : Documentation
10293 runs-on : ubuntu-latest
10394
10495 steps :
10596 - uses : actions/checkout@v3
10697
10798 - name : " Build Documentation"
108- uses : pyansys/pydpf-actions/build_doc@v2.2.dev1
99+ uses : pyansys/pydpf-actions/build_doc@feat/use_build
109100 with :
110101 python-version : " 3.8"
111102 ANSYS_VERSION : ${{env.ANSYS_VERSION}}
112103 PACKAGE_NAME : ${{env.PACKAGE_NAME}}
113104 MODULE : ${{env.MODULE}}
114105 dpf-standalone-TOKEN : ${{secrets.DPF_PIPELINE}}
115106 install_extras : plotting
107+ debug : true
116108 timeout-minutes : 30
117109
118- Build_and_Test_other_Python :
119- name : Build and Test other Pythons
120- runs-on : ${{ matrix.os }}
121- strategy :
122- fail-fast : false
123- matrix :
124- python-version : ["3.8", "3.9", "3.10"]
125- os : ["windows-latest", "ubuntu-latest"]
126-
127- steps :
128- - uses : actions/checkout@v3
129-
130- - name : " Build Package"
131- uses :
pyansys/pydpf-actions/[email protected] 132- with :
133- python-version : ${{ matrix.python-version }}
134- ANSYS_VERSION : ${{env.ANSYS_VERSION}}
135- PACKAGE_NAME : ${{env.PACKAGE_NAME}}
136- MODULE : ${{env.MODULE}}
137- dpf-standalone-TOKEN : ${{secrets.DPF_PIPELINE}}
138- install_extras : plotting
139- wheelhouse : true
140- wheel : false
141-
142- - name : " Prepare Testing Environment"
143- uses :
pyansys/pydpf-actions/[email protected] 144- with :
145- DEBUG : true
146-
147- - name : " Test Docstrings"
148- uses :
pyansys/pydpf-actions/[email protected] 149- with :
150- MODULE : ${{env.MODULE}}
151- PACKAGE_NAME : ${{env.PACKAGE_NAME}}
152-
153- - name : " Kill all servers"
154- uses :
pyansys/pydpf-actions/[email protected] 155- if : always()
156-
157- - name : " Test API"
158- shell : bash
159- working-directory : tests
160- run : |
161- 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 .
162-
163- - name : " Kill all servers"
164- uses :
pyansys/pydpf-actions/[email protected] 165- if : always()
166-
167- - name : " Upload Test Results"
168- uses : actions/upload-artifact@v3
169- with :
170- name : ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ env.ANSYS_VERSION }}
171- path : tests/junit/test-results.xml
172-
173- - name : " Upload coverage to Codecov"
174- uses : codecov/codecov-action@v3
175110
176- Draft_Release :
111+ draft_release :
112+ name : " Draft release"
177113 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
178- needs : [Style_Check, Build_and_Test, Documentation, Build_and_Test_other_Python ]
114+ needs : [style, build_test, docs ]
179115 runs-on : ubuntu-latest
180116 steps :
181117 - name : " Set up Python"
0 commit comments