Skip to content

Commit

Permalink
Pipeline update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Nov 3, 2024
1 parent 6b27f24 commit 297bf1b
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 77 deletions.
224 changes: 152 additions & 72 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,124 +4,204 @@ on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'
# Every Friday at 22:00 - rerun pipeline to check for dependency-based issues
- cron: '0 22 * * 5'

jobs:
UnitTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@r1
with:
name: pyEDAA.ProjectModel
python_version_list: "3.9 3.10 3.11 3.12 pypy-3.9 pypy-3.10"
disable_list: "mingw64:* ucrt64:*"

Params:
AppTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
with:
name: pyEDAA.ProjectModel
python_version_list: "" # use latest Python version
system_list: "ubuntu macos macos-arm"
# include_list:
# exclude_list:
# disable_list: "windows:pypy-3.8 windows:pypy-3.9 windows:pypy-3.10"

UnitTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
needs:
- Params
with:
jobs: ${{ needs.Params.outputs.python_jobs }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}

Coverage:
uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev
needs:
- Params
- UnitTestingParams
with:
python_version: ${{ needs.Params.outputs.python_version }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
secrets:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
requirements: "-r tests/unit/requirements.txt"
# pacboy: "msys/git python-lxml:p"
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}

StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r1
needs:
- Params
- UnitTestingParams
with:
python_version: ${{ needs.Params.outputs.python_version }}
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
commands: |
cd pyEDAA
mypy --html-report ../htmlmypy -p ProjectModel
html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
touch pyEDAA/__init__.py
mypy --html-report htmlmypy -p pyEDAA.ProjectModel
html_report: 'htmlmypy'
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}

PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
DocCoverage:
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r1
needs:
- UnitTesting
- UnitTestingParams
with:
additional_merge_args: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
directory: pyEDAA/ProjectModel
# fail_below: 70

Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@dev
uses: pyTooling/Actions/.github/workflows/Package.yml@r1
needs:
- Params
- Coverage
- UnitTestingParams
- UnitTesting
with:
python_version: ${{ needs.Params.outputs.python_version }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}

Release:
uses: pyTooling/Actions/.github/workflows/Release.yml@dev
if: startsWith(github.ref, 'refs/tags')
AppTesting:
uses: pyTooling/Actions/.github/workflows/ApplicationTesting.yml@r1
needs:
- UnitTesting
- Coverage
- StaticTypeCheck
- AppTestingParams
- UnitTestingParams
- Package
with:
jobs: ${{ needs.AppTestingParams.outputs.python_jobs }}
wheel: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
apptest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).apptesting_xml }}

PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev
if: startsWith(github.ref, 'refs/tags')
PublishCoverageResults:
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@r1
needs:
- Params
- Release
- Package
- UnitTestingParams
- UnitTesting
with:
python_version: ${{ needs.Params.outputs.python_version }}
requirements: -r dist/requirements.txt
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
# coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}

VerifyDocs:
uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
needs:
- Params
- UnitTestingParams
- UnitTesting
with:
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}

# VerifyDocs:
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r1
# needs:
# - UnitTestingParams
# with:
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }}

HTMLDocumentation:
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r1
needs:
- UnitTestingParams
- PublishTestResults
- PublishCoverageResults
# - VerifyDocs
with:
python_version: ${{ needs.Params.outputs.python_version }}
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-ubuntu-native-3.12
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}

BuildTheDocs:
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev
IntermediateCleanUp:
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r1
needs:
- Params
- VerifyDocs
- UnitTestingParams
- PublishCoverageResults
- PublishTestResults
- HTMLDocumentation
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-

# PDFDocumentation:
# uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r1
# needs:
# - UnitTestingParams
# - HTMLDocumentation
# with:
# document: pyEDAA.ProjectModel
# latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
# pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}

PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r1
needs:
- Params
- BuildTheDocs
- Coverage
- UnitTestingParams
- HTMLDocumentation
# - PDFDocumentation
- PublishCoverageResults
- StaticTypeCheck
with:
doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}

ReleasePage:
uses: pyTooling/Actions/.github/workflows/Release.yml@r1
if: startsWith(github.ref, 'refs/tags')
needs:
- Package
- AppTesting
- PublishToGitHubPages

PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r1
if: startsWith(github.ref, 'refs/tags')
needs:
- UnitTestingParams
- ReleasePage
with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
requirements: -r dist/requirements.txt
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r1
needs:
- Params
- UnitTestingParams
- UnitTesting
- Coverage
- StaticTypeCheck
- BuildTheDocs
- PublishToGitHubPages
- HTMLDocumentation
# - PDFDocumentation
- PublishTestResults
- PublishCoverageResults
- PublishToGitHubPages
# - PublishOnPyPI
- IntermediateCleanUp
with:
package: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
remaining: |
${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}-*
${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).apptesting_xml }}-*
# ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
2 changes: 1 addition & 1 deletion .idea/pyEDAA.ProjectModel.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/Dependency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ the mandatory dependencies too.
+=====================================================================+=============+========================================================================================+======================+
| `pytest <https://GitHub.com/pytest-dev/pytest>`__ | ≥8.3 | `MIT <https://GitHub.com/pytest-dev/pytest/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ |5.0 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ |6.0 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.6 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools ~= 75.2",
"setuptools ~= 75.3",
"wheel ~= 0.44",
"pyTooling ~= 7.0"
]
Expand All @@ -11,7 +11,7 @@ line-length = 120

[tool.mypy]
files = ["pyEDAA.ProjectModel"]
python_version = "3.12"
python_version = "3.13"
#ignore_missing_imports = true
strict = true
pretty = true
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Coverage ~= 7.6

# Test Runner
pytest ~= 8.3
pytest-cov ~= 5.0
pytest-cov ~= 6.0

# Static Type Checking
mypy ~= 1.13
Expand Down
1 change: 1 addition & 0 deletions tests/unit/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r ../requirements.txt

0 comments on commit 297bf1b

Please sign in to comment.