Skip to content

Commit 1ee993b

Browse files
committed
Added code quality checks and updated pipeline.
1 parent 89a9128 commit 1ee993b

File tree

1 file changed

+45
-29
lines changed

1 file changed

+45
-29
lines changed

.github/workflows/Pipeline.yml

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,27 @@ jobs:
5050
html_report: ${{ needs.ConfigParams.outputs.typing_report_html }}
5151
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
5252

53+
CodeQuality:
54+
uses: pyTooling/Actions/.github/workflows/CheckCodeQuality.yml@r6
55+
needs:
56+
- UnitTestingParams
57+
with:
58+
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
59+
package_directory: ${{ needs.UnitTestingParams.outputs.package_directory }}
60+
artifact: CodeQuality
61+
5362
DocCoverage:
5463
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r6
5564
needs:
56-
- ConfigParams
5765
- UnitTestingParams
5866
with:
5967
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
60-
directory: ${{ needs.ConfigParams.outputs.package_directory }}
68+
directory: ${{ needs.UnitTestingParams.outputs.package_directory }}
6169

6270
Package:
6371
uses: pyTooling/Actions/.github/workflows/Package.yml@r6
6472
needs:
6573
- UnitTestingParams
66-
- UnitTesting
6774
with:
6875
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
6976
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
@@ -101,7 +108,7 @@ jobs:
101108
name: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
102109
path: install
103110

104-
- name: 🔧 Install wheel from artifact
111+
- name: 🔧 Install wheel from artifact (Ubuntu/macOS)
105112
run: |
106113
ls -l install
107114
python -m pip install -U --disable-pip-version-check --break-system-packages install/*.whl
@@ -132,6 +139,7 @@ jobs:
132139
- ConfigParams
133140
- UnitTestingParams
134141
- UnitTesting
142+
if: success() || failure()
135143
with:
136144
coverage_report_json: ${{ needs.ConfigParams.outputs.coverage_report_json }}
137145
coverage_report_html: ${{ needs.ConfigParams.outputs.coverage_report_html }}
@@ -150,26 +158,17 @@ jobs:
150158
- UnitTestingParams
151159
- UnitTesting
152160
- AppTesting
161+
if: success() || failure()
153162
with:
154163
additional_merge_args: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.app" --render=tree'
155-
testsuite-summary-name: ${{ needs.ConfigParams.outputs.package_fullname }}
156-
merged_junit_filename: ${{ needs.ConfigParams.outputs.unittest_merged_report_xml_filename }}
164+
testsuite-summary-name: ${{ needs.UnitTestingParams.outputs.package_fullname }}
165+
merged_junit_filename: ${{ fromJson(needs.ConfigParams.outputs.unittest_merged_report_xml).filename }}
157166
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
158167
dorny: true
159168
codecov: true
160169
secrets:
161170
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
162171

163-
IntermediateCleanUp:
164-
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r6
165-
needs:
166-
- UnitTestingParams
167-
- PublishCoverageResults
168-
- PublishTestResults
169-
with:
170-
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
171-
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
172-
173172
# VerifyDocs:
174173
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r6
175174
# needs:
@@ -193,16 +192,26 @@ jobs:
193192
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
194193
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
195194

196-
# PDFDocumentation:
197-
# uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r6
198-
# needs:
199-
# - ConfigParams
200-
# - UnitTestingParams
201-
# - Documentation
202-
# with:
203-
# document: ${{ needs.ConfigParams.outputs.package_fullname }}
204-
# latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
205-
# pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
195+
IntermediateCleanUp:
196+
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r6
197+
needs:
198+
- UnitTestingParams
199+
- PublishCoverageResults
200+
- PublishTestResults
201+
with:
202+
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
203+
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
204+
205+
PDFDocumentation:
206+
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@dev
207+
needs:
208+
- UnitTestingParams
209+
- Documentation
210+
with:
211+
document: ${{ needs.UnitTestingParams.outputs.package_fullname }}
212+
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
213+
pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
214+
can-fail: 'true'
206215

207216
PublishToGitHubPages:
208217
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r6
@@ -227,33 +236,40 @@ jobs:
227236
# - StaticTypeCheck
228237
- Package
229238
- PublishToGitHubPages
230-
if: needs.Prepare.outputs.is_release_commit
239+
if: needs.Prepare.outputs.is_release_commit == 'true' && github.event_name != 'schedule'
231240
permissions:
232241
contents: write # required for create tag
233242
actions: write # required for trigger workflow
234243
with:
235244
version: ${{ needs.Prepare.outputs.version }}
236245
auto_tag: ${{ needs.Prepare.outputs.is_release_commit }}
246+
secrets: inherit
237247

238248
ReleasePage:
239249
uses: pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@r6
240-
if: needs.Prepare.outputs.is_release_tag == 'true'
241250
needs:
242251
- Prepare
243252
- AppTesting
244253
- Examples
245254
# - StaticTypeCheck
246255
- Package
247256
- PublishToGitHubPages
257+
if: needs.Prepare.outputs.is_release_tag == 'true'
258+
permissions:
259+
contents: write
260+
actions: write
248261
with:
249262
tag: ${{ needs.Prepare.outputs.version }}
263+
secrets: inherit
250264

251265
PublishOnPyPI:
252266
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r6
253-
if: startsWith(github.ref, 'refs/tags')
254267
needs:
268+
- Prepare
255269
- UnitTestingParams
270+
- Package
256271
- ReleasePage
272+
if: needs.Prepare.outputs.is_release_tag == 'true'
257273
with:
258274
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
259275
requirements: '-r dist/requirements.txt'

0 commit comments

Comments
 (0)