From 316eaa115e84996e162511410fbc4cd9f25a27ac Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 18:34:48 +0200 Subject: [PATCH 1/9] Updated checkout to v4. --- .github/workflows/ApplicationTesting.yml | 2 +- .github/workflows/BuildTheDocs.yml | 2 +- .github/workflows/CoverageCollection.yml | 2 +- .github/workflows/Package.yml | 2 +- .github/workflows/PublishTestResults.yml | 2 +- .github/workflows/PublishToGitHubPages.yml | 2 +- .github/workflows/StaticTypeCheck.yml | 2 +- .github/workflows/TestReleaser.yml | 6 +++--- .github/workflows/UnitTesting.yml | 2 +- .github/workflows/VerifyDocs.yml | 2 +- doc/Action/Releaser.rst | 2 +- releaser/README.md | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ApplicationTesting.yml b/.github/workflows/ApplicationTesting.yml index a23833d..e60c096 100644 --- a/.github/workflows/ApplicationTesting.yml +++ b/.github/workflows/ApplicationTesting.yml @@ -82,7 +82,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 📥 Download artifacts '${{ inputs.wheel }}' from 'Package' job uses: actions/download-artifact@v3 diff --git a/.github/workflows/BuildTheDocs.yml b/.github/workflows/BuildTheDocs.yml index cade896..c2f1d6e 100644 --- a/.github/workflows/BuildTheDocs.yml +++ b/.github/workflows/BuildTheDocs.yml @@ -38,7 +38,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🛳️ Build documentation uses: buildthedocs/btd@v0 diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index fc8f08d..f335fbb 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -67,7 +67,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/Package.yml b/.github/workflows/Package.yml index fc45356..6ae3812 100644 --- a/.github/workflows/Package.yml +++ b/.github/workflows/Package.yml @@ -48,7 +48,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index e93b3ba..35771da 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -39,7 +39,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Artifacts uses: actions/download-artifact@v3 diff --git a/.github/workflows/PublishToGitHubPages.yml b/.github/workflows/PublishToGitHubPages.yml index bd22990..445a25c 100644 --- a/.github/workflows/PublishToGitHubPages.yml +++ b/.github/workflows/PublishToGitHubPages.yml @@ -48,7 +48,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 📥 Download artifacts '${{ inputs.doc }}' from 'BuildTheDocs' job uses: actions/download-artifact@v3 diff --git a/.github/workflows/StaticTypeCheck.yml b/.github/workflows/StaticTypeCheck.yml index 4113c25..18af69e 100644 --- a/.github/workflows/StaticTypeCheck.yml +++ b/.github/workflows/StaticTypeCheck.yml @@ -67,7 +67,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/TestReleaser.yml b/.github/workflows/TestReleaser.yml index dc2252e..70f46b4 100644 --- a/.github/workflows/TestReleaser.yml +++ b/.github/workflows/TestReleaser.yml @@ -45,7 +45,7 @@ jobs: env: DOCKER_BUILDKIT: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build container image run: docker build -t ghcr.io/pytooling/releaser -f releaser/Dockerfile releaser @@ -62,7 +62,7 @@ jobs: Composite: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt @@ -122,7 +122,7 @@ jobs: - Composite runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: echo "Build some tool and generate some (versioned) artifacts" > artifact-$(date -u +"%Y-%m-%dT%H-%M-%SZ").txt diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index 4505de7..abf48a3 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -77,7 +77,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compute pacman/pacboy packages id: pacboy diff --git a/.github/workflows/VerifyDocs.yml b/.github/workflows/VerifyDocs.yml index de281ff..1c4c47f 100644 --- a/.github/workflows/VerifyDocs.yml +++ b/.github/workflows/VerifyDocs.yml @@ -39,7 +39,7 @@ jobs: steps: - name: ⏬ Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🐍 Setup Python uses: actions/setup-python@v4 diff --git a/doc/Action/Releaser.rst b/doc/Action/Releaser.rst index 95a4212..d91b04f 100644 --- a/doc/Action/Releaser.rst +++ b/doc/Action/Releaser.rst @@ -85,7 +85,7 @@ The following block shows a minimal YAML workflow file: steps: # Clone repository - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Build your application, tool, artifacts, etc. - name: Build diff --git a/releaser/README.md b/releaser/README.md index a5b3b1d..33a78cc 100644 --- a/releaser/README.md +++ b/releaser/README.md @@ -79,7 +79,7 @@ jobs: steps: # Clone repository - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Build your application, tool, artifacts, etc. - name: Build From 3cb8ca83a497dd894586cdd76fdb108412a619fc Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 18:55:07 +0200 Subject: [PATCH 2/9] Added dummy Python project to test the pipeline. --- .github/workflows/_Checking_Pipeline.yml | 160 +++++++++++++++++++++++ pyDummy/__init__.py | 48 +++++++ pyDummy/py.typed | 0 pyproject.toml | 60 +++++++++ setup.py | 50 +++++++ tests/requirements.txt | 13 ++ tests/unit/Dummy.py | 40 ++++++ 7 files changed, 371 insertions(+) create mode 100644 .github/workflows/_Checking_Pipeline.yml create mode 100644 pyDummy/__init__.py create mode 100644 pyDummy/py.typed create mode 100644 pyproject.toml create mode 100644 setup.py create mode 100644 tests/requirements.txt create mode 100644 tests/unit/Dummy.py diff --git a/.github/workflows/_Checking_Pipeline.yml b/.github/workflows/_Checking_Pipeline.yml new file mode 100644 index 0000000..e07878c --- /dev/null +++ b/.github/workflows/_Checking_Pipeline.yml @@ -0,0 +1,160 @@ +name: Pipeline + +on: + push: + workflow_dispatch: + +jobs: + UnitTestingParams: + uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev + with: + name: pyTooling + python_version_list: "3.7 3.8 pypy-3.8 3.9 pypy-3.9 3.10 3.11" + exclude_list: "windows:pypy-3.8 windows:pypy-3.9" +# disable_list: "windows:3.11" + + PlatformTestingParams: + uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev + with: + name: Platform + python_version_list: "" + system_list: "ubuntu windows macos mingw32 mingw64 clang64 ucrt64" + + UnitTesting: + uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev + needs: + - UnitTestingParams + with: + jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }} + artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} + + PlatformTesting: + uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev + needs: + - PlatformTestingParams + with: + jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }} + tests_directory: "" + unittest_directory: tests/unit/Platform + artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }} + + Coverage: + uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev + needs: + - UnitTestingParams + with: + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} + artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} + secrets: + codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} + + PublishCoverageResults: + uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev + needs: + - Coverage + - PlatformTesting2 + with: + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} + artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} + secrets: + codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} + + StaticTypeCheck: + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev + needs: + - UnitTestingParams + with: + python_version: ${{ needs.UnitTestingParams.outputs.python_version }} + commands: | + touch pyTooling/__init__.py + mypy --html-report htmlmypy -p pyTooling + html_report: 'htmlmypy' + html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} + + PublishTestResults: + uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev + needs: + - UnitTesting + - PerformanceTesting + - Benchmarking + + Package: + uses: pyTooling/Actions/.github/workflows/Package.yml@dev + needs: + - UnitTestingParams + - Coverage + - PlatformTesting + with: + 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') + needs: + - UnitTesting + - Coverage + - StaticTypeCheck + - Package + + PublishOnPyPI: + uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev + if: startsWith(github.ref, 'refs/tags') + needs: + - UnitTestingParams + - Release + - Package + 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 }} + +# VerifyDocs: +# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev +# needs: +# - UnitTestingParams +# with: +# python_version: ${{ needs.UnitTestingParams.outputs.python_version }} + +# BuildTheDocs: +# uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev +# needs: +# - UnitTestingParams +## - VerifyDocs +# with: +# artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} + + PublishToGitHubPages: + uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev + needs: + - UnitTestingParams +# - BuildTheDocs + - Coverage + - StaticTypeCheck + with: + 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 }} + + ArtifactCleanUp: + uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev + needs: + - UnitTestingParams + - UnitTesting + - PerformanceTesting + - Benchmarking + - PlatformTesting + - Coverage + - StaticTypeCheck +# - BuildTheDocs + - PublishToGitHubPages + - PublishTestResults + with: + package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} + remaining: | + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-* + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} + ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} diff --git a/pyDummy/__init__.py b/pyDummy/__init__.py new file mode 100644 index 0000000..f274032 --- /dev/null +++ b/pyDummy/__init__.py @@ -0,0 +1,48 @@ +# ==================================================================================================================== # +# _____ _ _ _ _ _ # +# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ # +# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| # +# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ # +# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ # +# |_| |___/ |___/ # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +__author__ = "Patrick Lehmann" +__email__ = "Paebbels@gmail.com" +__copyright__ = "2017-2023, Patrick Lehmann" +__license__ = "Apache License, Version 2.0" +__version__ = "0.1.0" +__keywords__ = ["dummy"] +__issue_tracker__ = "https://GitHub.com/pyTooling/Actions/issues" + + +class Application: + _value: int + + def __init__(self): + self._value = 1 + + @property + def Value(self) -> int: + return self._value diff --git a/pyDummy/py.typed b/pyDummy/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..dca4a29 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,60 @@ +[build-system] +requires = [ + "setuptools >= 68.0.0", + "wheel >= 0.40.0", + "pyTooling >= 5.0.0" +] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 120 + +[tool.mypy] +files = ["pyDummy"] +python_version = "3.11" +#ignore_missing_imports = true +strict = true +pretty = true +show_error_context = true +show_error_codes = true +namespace_packages = true +html_report = "report/typing" + +[tool.pytest.ini_options] +# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes +# derived from unittest.Testcase +python_files = "*" +python_functions = "test_*" +filterwarnings = [ + "error::DeprecationWarning", + "error::PendingDeprecationWarning" +] + +[tool.coverage.run] +branch = true +omit = [ + "*site-packages*", + "setup.py", + "tests/*" +] + +[tool.coverage.report] +skip_covered = false +skip_empty = true +exclude_lines = [ + "pragma: no cover", + "raise NotImplementedError" +] +omit = [ + "tests/*" +] + +[tool.coverage.xml] +output = "report/coverage/coverage.xml" + +[tool.coverage.json] +output = "report/coverage/coverage.json" + +[tool.coverage.html] +directory = "report/coverage/html" +title="Code Coverage of pyDummy" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..136ae70 --- /dev/null +++ b/setup.py @@ -0,0 +1,50 @@ +# ==================================================================================================================== # +# _____ _ _ _ _ _ # +# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ # +# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| # +# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ # +# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ # +# |_| |___/ |___/ # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +from setuptools import setup + +from pathlib import Path +from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub + +gitHubNamespace = "pyTooling" +packageName = "pyDummy" +packageDirectory = packageName +packageInformationFile = Path(f"{packageDirectory}/__init__.py") + +setup(**DescribePythonPackageHostedOnGitHub( + packageName=packageName, + description="pyDummy is a test package to verify GitHub actions for Python projects.", + gitHubNamespace=gitHubNamespace, + unittestRequirementsFile=Path("tests/requirements.txt"), + sourceFileWithVersion=packageInformationFile, + dataFiles={ + packageName: ["py.typed"] + } +)) diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000..e75ed5e --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,13 @@ +-r ../requirements.txt + +# Coverage collection +Coverage >= 7.3 + +# Test Runner +pytest >= 7.4.0 +pytest-cov >= 4.1.0 + +# Static Type Checking +mypy >= 1.5.0 +typing_extensions >= 4.7.1 +lxml>=4.9 diff --git a/tests/unit/Dummy.py b/tests/unit/Dummy.py new file mode 100644 index 0000000..2a5c3e6 --- /dev/null +++ b/tests/unit/Dummy.py @@ -0,0 +1,40 @@ +# ==================================================================================================================== # +# _____ _ _ _ _ _ # +# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ # +# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| # +# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ # +# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ # +# |_| |___/ |___/ # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +from unittest import TestCase + +from pyDummy import Application + + +class Instantiation(TestCase): + def test_Application(self): + app = Application() + + self.assertEqual(1, app.Value) From 996c1b6f94091265f03697401c1c9419fb04635b Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 18:56:45 +0200 Subject: [PATCH 3/9] Added PublishCoverageResults action. --- .github/workflows/PublishCoverageResults.yml | 63 ++++++++++++++++++++ .github/workflows/_Checking_Pipeline.yml | 30 +++++----- 2 files changed, 78 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/PublishCoverageResults.yml diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml new file mode 100644 index 0000000..0550ab5 --- /dev/null +++ b/.github/workflows/PublishCoverageResults.yml @@ -0,0 +1,63 @@ +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# ==================================================================================================================== # +# Copyright 2020-2023 The pyTooling Authors # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +name: Publish Unit Test Results + +on: + workflow_call: + inputs: + report_files: + description: 'Pattern of report files to upload. Can be a comma separated list.' + required: false + default: 'artifacts/**/*.xml' + type: string + +jobs: + PublishTestResults: + name: 📊 Publish Test Results + runs-on: ubuntu-latest + if: always() + + steps: + - name: ⏬ Checkout repository + uses: actions/checkout@v4 + + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: 📊 Publish code coverage at CodeCov + if: inputs.CodeCov == true + continue-on-error: true + uses: codecov/codecov-action@v3 + with: + files: ${{ steps.getVariables.outputs.coverage_report_xml }} + flags: unittests + env_vars: PYTHON + + - name: 📉 Publish code coverage at Codacy + if: inputs.Codacy == true + continue-on-error: true + uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.codacy_token }} + coverage-reports: ${{ steps.getVariables.outputs.coverage_report_xml }} diff --git a/.github/workflows/_Checking_Pipeline.yml b/.github/workflows/_Checking_Pipeline.yml index e07878c..6efa4c3 100644 --- a/.github/workflows/_Checking_Pipeline.yml +++ b/.github/workflows/_Checking_Pipeline.yml @@ -6,7 +6,7 @@ on: jobs: UnitTestingParams: - uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev + uses: pyTooling/Actions/.github/workflows/Parameters.yml@cov with: name: pyTooling python_version_list: "3.7 3.8 pypy-3.8 3.9 pypy-3.9 3.10 3.11" @@ -14,14 +14,14 @@ jobs: # disable_list: "windows:3.11" PlatformTestingParams: - uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev + uses: pyTooling/Actions/.github/workflows/Parameters.yml@cov with: name: Platform python_version_list: "" system_list: "ubuntu windows macos mingw32 mingw64 clang64 ucrt64" UnitTesting: - uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev + uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@cov needs: - UnitTestingParams with: @@ -29,7 +29,7 @@ jobs: artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} PlatformTesting: - uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev + uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@cov needs: - PlatformTestingParams with: @@ -39,7 +39,7 @@ jobs: artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }} Coverage: - uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev + uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@cov needs: - UnitTestingParams with: @@ -49,7 +49,7 @@ jobs: codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} PublishCoverageResults: - uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev + uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@cov needs: - Coverage - PlatformTesting2 @@ -60,7 +60,7 @@ jobs: codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} StaticTypeCheck: - uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@cov needs: - UnitTestingParams with: @@ -72,14 +72,14 @@ jobs: html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} PublishTestResults: - uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev + uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@cov needs: - UnitTesting - PerformanceTesting - Benchmarking Package: - uses: pyTooling/Actions/.github/workflows/Package.yml@dev + uses: pyTooling/Actions/.github/workflows/Package.yml@cov needs: - UnitTestingParams - Coverage @@ -89,7 +89,7 @@ jobs: artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} Release: - uses: pyTooling/Actions/.github/workflows/Release.yml@dev + uses: pyTooling/Actions/.github/workflows/Release.yml@cov if: startsWith(github.ref, 'refs/tags') needs: - UnitTesting @@ -98,7 +98,7 @@ jobs: - Package PublishOnPyPI: - uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev + uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@cov if: startsWith(github.ref, 'refs/tags') needs: - UnitTestingParams @@ -112,14 +112,14 @@ jobs: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} # VerifyDocs: -# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev +# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@cov # needs: # - UnitTestingParams # with: # python_version: ${{ needs.UnitTestingParams.outputs.python_version }} # BuildTheDocs: -# uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev +# uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@cov # needs: # - UnitTestingParams ## - VerifyDocs @@ -127,7 +127,7 @@ jobs: # artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} PublishToGitHubPages: - uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev + uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@cov needs: - UnitTestingParams # - BuildTheDocs @@ -139,7 +139,7 @@ jobs: typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} ArtifactCleanUp: - uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev + uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@cov needs: - UnitTestingParams - UnitTesting From d754745237c37865ac75c340897fcf03c09272fb Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 19:05:31 +0200 Subject: [PATCH 4/9] Renamed workflows. --- .github/workflows/Pipeline.yml | 3 ++- .github/workflows/_Checking_Pipeline.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index ecb5552..7768911 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -1,4 +1,5 @@ -name: Pipeline +#name: Pipeline +name: Documentation on: push: diff --git a/.github/workflows/_Checking_Pipeline.yml b/.github/workflows/_Checking_Pipeline.yml index 6efa4c3..2c4c216 100644 --- a/.github/workflows/_Checking_Pipeline.yml +++ b/.github/workflows/_Checking_Pipeline.yml @@ -1,4 +1,4 @@ -name: Pipeline +name: Verification Pipeline on: push: From 60967bdde1e54d601fe81808a17ab45cc8121de7 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 19:08:43 +0200 Subject: [PATCH 5/9] Fixed Workflow syntax. --- .github/workflows/PublishCoverageResults.yml | 4 +++ .github/workflows/_Checking_Pipeline.yml | 23 ++++++--------- pyDummy/__init__.py | 3 ++ requirements.txt | 1 + tests/unit/__init__.py | 31 ++++++++++++++++++++ tests/unit/requirements.txt | 1 + 6 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 tests/unit/__init__.py create mode 100644 tests/unit/requirements.txt diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index 0550ab5..017da5f 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -29,6 +29,10 @@ on: required: false default: 'artifacts/**/*.xml' type: string + secrets: + codacy_token: + description: 'Token to push result to codacy.' + required: true jobs: PublishTestResults: diff --git a/.github/workflows/_Checking_Pipeline.yml b/.github/workflows/_Checking_Pipeline.yml index 2c4c216..98be005 100644 --- a/.github/workflows/_Checking_Pipeline.yml +++ b/.github/workflows/_Checking_Pipeline.yml @@ -1,4 +1,4 @@ -name: Verification Pipeline +name: Verification of Complete Pipeline on: push: @@ -8,8 +8,9 @@ jobs: UnitTestingParams: uses: pyTooling/Actions/.github/workflows/Parameters.yml@cov with: - name: pyTooling - python_version_list: "3.7 3.8 pypy-3.8 3.9 pypy-3.9 3.10 3.11" + name: pyDummy + python_version_list: "3.11" +# python_version_list: "3.7 3.8 pypy-3.8 3.9 pypy-3.9 3.10 3.11" exclude_list: "windows:pypy-3.8 windows:pypy-3.9" # disable_list: "windows:3.11" @@ -18,7 +19,8 @@ jobs: with: name: Platform python_version_list: "" - system_list: "ubuntu windows macos mingw32 mingw64 clang64 ucrt64" + system_list: "ubuntu" +# system_list: "ubuntu windows macos mingw32 mingw64 clang64 ucrt64" UnitTesting: uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@cov @@ -51,11 +53,8 @@ jobs: PublishCoverageResults: uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@cov needs: + - UnitTesting - Coverage - - PlatformTesting2 - with: - python_version: ${{ needs.UnitTestingParams.outputs.python_version }} - artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} secrets: codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} @@ -66,8 +65,7 @@ jobs: with: python_version: ${{ needs.UnitTestingParams.outputs.python_version }} commands: | - touch pyTooling/__init__.py - mypy --html-report htmlmypy -p pyTooling + mypy --html-report htmlmypy -p pyDummy html_report: 'htmlmypy' html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} @@ -75,8 +73,6 @@ jobs: uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@cov needs: - UnitTesting - - PerformanceTesting - - Benchmarking Package: uses: pyTooling/Actions/.github/workflows/Package.yml@cov @@ -143,13 +139,12 @@ jobs: needs: - UnitTestingParams - UnitTesting - - PerformanceTesting - - Benchmarking - PlatformTesting - Coverage - StaticTypeCheck # - BuildTheDocs - PublishToGitHubPages + - PublishCoverageResults - PublishTestResults with: package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} diff --git a/pyDummy/__init__.py b/pyDummy/__init__.py index f274032..f5bf0e0 100644 --- a/pyDummy/__init__.py +++ b/pyDummy/__init__.py @@ -36,7 +36,10 @@ __version__ = "0.1.0" __keywords__ = ["dummy"] __issue_tracker__ = "https://GitHub.com/pyTooling/Actions/issues" +from pyTooling.Decorators import export + +@export class Application: _value: int diff --git a/requirements.txt b/requirements.txt index e69de29..4ad7e0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1 @@ +pyTooling >= 5.0.0, <6.0.0 diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..896d194 --- /dev/null +++ b/tests/unit/__init__.py @@ -0,0 +1,31 @@ +# ==================================================================================================================== # +# _____ _ _ _ _ _ # +# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ # +# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| # +# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ # +# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ # +# |_| |___/ |___/ # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +"""Test code for pyTooling.""" diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt new file mode 100644 index 0000000..3c8d7e7 --- /dev/null +++ b/tests/unit/requirements.txt @@ -0,0 +1 @@ +-r ../requirements.txt From 56726cf929e23ed6f35e5e66b8a033c2a178c7f2 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 20:10:23 +0200 Subject: [PATCH 6/9] Fixed mypy warning. --- pyDummy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyDummy/__init__.py b/pyDummy/__init__.py index f5bf0e0..83a8d41 100644 --- a/pyDummy/__init__.py +++ b/pyDummy/__init__.py @@ -43,7 +43,7 @@ from pyTooling.Decorators import export class Application: _value: int - def __init__(self): + def __init__(self) -> None: self._value = 1 @property From a6a92e9c02dfecf209592eab044861e82c1ad1c3 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 22:36:01 +0200 Subject: [PATCH 7/9] testing PYTHONPATH changes. --- .github/workflows/UnitTesting.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index abf48a3..4043d16 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -200,6 +200,7 @@ jobs: if: matrix.system != 'windows' run: | export ENVIRONMENT_NAME="${{ matrix.envname }}" + export PYTHONPATH=$(pwd) ABSDIR=$(pwd) cd "${{ inputs.tests_directory || '.' }}" [ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS From 5237a1c53ce04c39a2f0db67be763862035a4557 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 22:55:38 +0200 Subject: [PATCH 8/9] Added platform specific tests. --- .github/workflows/UnitTesting.yml | 1 + tests/unit/Platform/__init__.py | 116 ++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 tests/unit/Platform/__init__.py diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index 4043d16..d1c2251 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -192,6 +192,7 @@ jobs: if: matrix.system == 'windows' run: | $env:ENVIRONMENT_NAME = "${{ matrix.envname }}" + $env:PYTHONPATH = (Get-Location).ToString() cd "${{ inputs.tests_directory || '.' }}" $PYTEST_ARGS = if ("${{ inputs.artifact }}") { "--junitxml=TestReportSummary.xml" } else { "" } python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes diff --git a/tests/unit/Platform/__init__.py b/tests/unit/Platform/__init__.py new file mode 100644 index 0000000..248a6c3 --- /dev/null +++ b/tests/unit/Platform/__init__.py @@ -0,0 +1,116 @@ +# ==================================================================================================================== # +# _____ _ _ _ _ _ # +# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ # +# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| # +# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ # +# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ # +# |_| |___/ |___/ # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +"""Unit tests for TBD.""" +from os import getenv as os_getenv +from pytest import mark +from unittest import TestCase + +from pyTooling.Platform import Platform + + +if __name__ == "__main__": # pragma: no cover + print("ERROR: you called a testcase declaration file as an executable module.") + print("Use: 'python -m unitest '") + exit(1) + + +class AnyPlatform(TestCase): + expected = os_getenv("ENVIRONMENT_NAME", default="Windows (x86-64)") + + @mark.skipif(os_getenv("ENVIRONMENT_NAME", "skip") == "skip", reason="Skipped when environment variable 'ENVIRONMENT_NAME' isn't set.") + def test_PlatformString(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Linux (x86-64)" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_NativeLinux' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_NativeLinux(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("MacOS (x86-64)" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_NativeMacOS' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_NativeMacOS(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows (x86-64)" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_NativeWindows' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_NativeWindows(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows+MSYS2 (x86-64) - MSYS" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_MSYS' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_MSYS(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows+MSYS2 (x86-64) - MinGW32" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_MinGW32' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_MinGW32(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows+MSYS2 (x86-64) - MinGW64" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_MinGW64' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_MinGW64(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows+MSYS2 (x86-64) - UCRT64" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_UCRT64' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_UCRT64(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows+MSYS2 (x86-64) - Clang32" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_Clang32' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_Clang32(self) -> None: + platform = Platform() + + print() + print(platform) + + @mark.skipif("Windows+MSYS2 (x86-64) - Clang64" != os_getenv("ENVIRONMENT_NAME", "skip"), reason=f"Skipped 'test_Clang64' when environment variable 'ENVIRONMENT_NAME' doesn't match. {os_getenv('ENVIRONMENT_NAME', 'skip')}") + def test_Clang64(self) -> None: + platform = Platform() + + print() + print(platform) From 582c5620b794c786dea1624ece3e55d2a9901d76 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 2 Oct 2023 23:04:34 +0200 Subject: [PATCH 9/9] Also fixed code coverage. --- .github/workflows/CoverageCollection.yml | 1 + .github/workflows/UnitTesting.yml | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index f335fbb..9c3e4e3 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -131,6 +131,7 @@ jobs: continue-on-error: true run: | export ENVIRONMENT_NAME="Linux (x86-64)" + export PYTHONPATH=$(pwd) ABSDIR=$(pwd) cd "${{ inputs.tests_directory || '.' }}" [ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index d1c2251..18e91d2 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -195,7 +195,8 @@ jobs: $env:PYTHONPATH = (Get-Location).ToString() cd "${{ inputs.tests_directory || '.' }}" $PYTEST_ARGS = if ("${{ inputs.artifact }}") { "--junitxml=TestReportSummary.xml" } else { "" } - python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes + Write-Host "python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }}" + python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }} - name: ☑ Run unit tests (Ubuntu/macOS) if: matrix.system != 'windows' @@ -206,7 +207,8 @@ jobs: cd "${{ inputs.tests_directory || '.' }}" [ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS [ -n '${{ inputs.artifact }}' ] && PYTEST_ARGS='--junitxml=TestReportSummary.xml' || unset PYTEST_ARGS - python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes + echo "python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }}" + python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }} - name: 📤 Upload 'TestReportSummary.xml' artifact if: inputs.artifact != ''