9
9
10
10
env :
11
11
MAIN_PYTHON_VERSION : ' 3.12'
12
+ DOCUMENTATION_CNAME : expert-adventure-nvnoo1y.pages.github.io
13
+ PACKAGE_NAME : allie-flowkit-python
12
14
13
15
concurrency :
14
16
group : ${{ github.workflow }}-${{ github.ref }}
@@ -24,38 +26,75 @@ jobs:
24
26
runs-on : ubuntu-latest
25
27
steps :
26
28
- name : " Run PyAnsys code style checks"
27
- uses : ansys/actions/code-style@v6
29
+ uses : ansys/actions/code-style@v7
30
+
31
+ smoke-tests :
32
+ name : Build and Smoke tests
33
+ runs-on : ${{ matrix.os }}
34
+ strategy :
35
+ fail-fast : false
36
+ matrix :
37
+ os : [ubuntu-latest, windows-latest, macos-latest]
38
+ python-version : ['3.10', '3.11', '3.12']
39
+ should-release :
40
+ - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
41
+ exclude :
42
+ - should-release : false
43
+ os : macos-latest
44
+ steps :
45
+ - name : Build wheelhouse and perform smoke test
46
+ uses : ansys/actions/build-wheelhouse@v7
47
+ with :
48
+ library-name : ${{ env.PACKAGE_NAME }}
49
+ operating-system : ${{ matrix.os }}
50
+ python-version : ${{ matrix.python-version }}
51
+
52
+ docs-style :
53
+ name : Documentation Style Check
54
+ runs-on : ubuntu-latest
55
+ steps :
56
+ - name : PyAnsys documentation style checks
57
+ uses : ansys/actions/doc-style@v7
58
+ with :
59
+ token : ${{ secrets.GITHUB_TOKEN }}
60
+
61
+ docs-build :
62
+ name : Documentation Build
63
+ runs-on : ubuntu-latest
64
+ needs : [docs-style]
65
+ steps :
66
+
67
+ - name : " Run Ansys documentation building action"
68
+ uses : ansys/actions/doc-build@v7
69
+ with :
70
+ add-pdf-html-docs-as-assets : true
71
+
72
+ upload_dev_docs :
73
+ name : Upload dev documentation
74
+ if : github.ref == 'refs/heads/main'
75
+ runs-on : ubuntu-latest
76
+ needs : [docs-build]
77
+ steps :
78
+ - name : Deploy the latest documentation
79
+ uses : ansys/actions/doc-deploy-dev@v7
80
+ with :
81
+ cname : ${{ env.DOCUMENTATION_CNAME }}
82
+ token : ${{ secrets.GITHUB_TOKEN }}
28
83
29
84
tests :
30
85
name : " Tests"
31
86
runs-on : ${{ matrix.os }}
32
- needs : [code-style ]
87
+ needs : [smoke-tests ]
33
88
strategy :
34
89
matrix :
35
90
os : [ubuntu-latest, windows-latest]
36
91
python-version : ['3.9', '3.12']
37
92
fail-fast : false
38
93
steps :
39
- - name : Checkout code
40
- uses : actions/checkout@v4
41
-
42
- - name : Set up Python ${{ matrix.python-version }}
43
- uses : actions/setup-python@v5
44
- with :
45
- python-version : ${{ matrix.python-version }}
46
-
47
- - name : Install dependencies
48
- run : |
49
- python -m pip install --upgrade pip
50
- pip install -r requirements.txt
51
94
52
95
- name : Testing
53
- uses : ansys/actions/tests-pytest@v6
96
+ uses : ansys/actions/tests-pytest@v7
54
97
timeout-minutes : 12
55
- with :
56
- checkout : false
57
- skip-install : true
58
- pytest-extra-args : " --cov=ansys.allie.flowkit.python --cov-report=term --cov-report=html:.cov/html --cov-report=xml:.cov/coverage.xml"
59
98
60
99
- name : Upload coverage results (HTML)
61
100
uses : actions/upload-artifact@v4
68
107
release :
69
108
name : " Release project"
70
109
if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
71
- needs : [code-style ]
110
+ needs : [docs-build, tests ]
72
111
runs-on : ubuntu-latest
73
112
steps :
74
113
- name : Checkout code
@@ -79,6 +118,19 @@ jobs:
79
118
with :
80
119
generate_release_notes : true
81
120
121
+ upload_docs_release :
122
+ name : Upload release documentation
123
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
124
+ runs-on : ubuntu-latest
125
+ needs : [release]
126
+ steps :
127
+ - name : Deploy the stable documentation
128
+ uses : ansys/actions/doc-deploy-stable@v7
129
+ with :
130
+ cname : ${{ env.DOCUMENTATION_CNAME }}
131
+ token : ${{ secrets.GITHUB_TOKEN }}
132
+
133
+
82
134
release-docker :
83
135
name : Generate Docker release
84
136
if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
0 commit comments