diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index 68c0bf98..6e8b5495 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -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 }} diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt new file mode 100644 index 00000000..3c8d7e78 --- /dev/null +++ b/tests/unit/requirements.txt @@ -0,0 +1 @@ +-r ../requirements.txt