mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-11 18:46:55 +08:00
Allow disabling the publishing of test reports via Dorny Test Reporter.
This commit is contained in:
4
.github/workflows/Parameters.yml
vendored
4
.github/workflows/Parameters.yml
vendored
@@ -83,7 +83,7 @@ on:
|
||||
windows_image:
|
||||
description: 'The used GitHub Action image for Windows based jobs.'
|
||||
required: false
|
||||
default: 'windows-latest'
|
||||
default: 'windows-2022'
|
||||
type: string
|
||||
macos_intel_image:
|
||||
description: 'The used GitHub Action image for macOS (Intel x86-64) based jobs.'
|
||||
@@ -93,7 +93,7 @@ on:
|
||||
macos_arm_image:
|
||||
description: 'The used GitHub Action image for macOS (ARM aarch64) based jobs.'
|
||||
required: false
|
||||
default: 'macos-latest'
|
||||
default: 'macos-14'
|
||||
type: string
|
||||
|
||||
outputs:
|
||||
|
||||
6
.github/workflows/PublishTestResults.yml
vendored
6
.github/workflows/PublishTestResults.yml
vendored
@@ -40,6 +40,11 @@ on:
|
||||
required: false
|
||||
default: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
|
||||
type: string
|
||||
publish:
|
||||
description: 'Publish test report summary via Dorny Test-Reporter'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
report_title:
|
||||
description: 'Title of the summary report in the pipeline''s sidebar'
|
||||
required: false
|
||||
@@ -80,6 +85,7 @@ jobs:
|
||||
|
||||
- name: 📊 Publish Unit Test Results
|
||||
uses: dorny/test-reporter@v1
|
||||
if: inputs.publish && inputs.report_title != ''
|
||||
with:
|
||||
name: ${{ inputs.report_title }}
|
||||
path: Unittesting.xml
|
||||
|
||||
@@ -8,7 +8,7 @@ print(f"Python: {version}")
|
||||
|
||||
def loadRequirementsFile(requirementsFile: Path):
|
||||
requirements = []
|
||||
with requirementsFile.open("r") as file:
|
||||
with requirementsFile.open("r", encoding="utf-8") as file:
|
||||
for line in file.readlines():
|
||||
line = line.strip()
|
||||
if line.startswith("#") or line.startswith("https") or line == "":
|
||||
@@ -84,7 +84,7 @@ for dependency in dependencies:
|
||||
# Write jobs to special file
|
||||
github_output = Path(getenv("GITHUB_OUTPUT"))
|
||||
print(f"GITHUB_OUTPUT: {github_output}")
|
||||
with github_output.open("a+") as f:
|
||||
with github_output.open("a+", encoding="utf-8") as f:
|
||||
f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n")
|
||||
|
||||
print(f"GITHUB_OUTPUT:")
|
||||
|
||||
Reference in New Issue
Block a user