Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/actions/junit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@ inputs:
required: false
default: ubuntu-latest

large_files:
description: Support for large files is enabled when set to true. Defaults to false, unless ignore_runs is true.
default: "false" # ignore_runs == true
required: false

ignore_runs:
description: Does not collect test run information from the test result files, which is useful for very large files. This disables any check run annotations.
default: "false"
required: false

comment_mode:
description: The action posts comments to pull requests that are associated with the commit.
required: false
default: always

comment_title:
description: An alternative name for the pull request comment.
required: false
default: Publish Deltas

check_name:
description: An alternative name for the check result.
required: false
default: Publish Deltas

runs:
using: composite
steps:
Expand Down Expand Up @@ -72,3 +97,8 @@ runs:
with:
runs-on: ${{ inputs.runs-on }}
files_pattern: ${{ inputs.files_pattern || 'INVALID' }}
large_files: ${{ inputs.large_files }}
ignore_runs: ${{ inputs.ignore_runs }}
comment_mode: ${{ inputs.comment_mode }}
comment_title: ${{ inputs.comment_title }}
check_name: ${{ inputs.check_name }}
46 changes: 43 additions & 3 deletions .github/actions/publish-test-deltas/action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,52 @@
name: publish-test-deltas
description: A wrapper around EnricoMi's publish-unit-test-result-action.
inputs:
runs-on:
description: OS to run the action on
required: false
default: ubuntu-latest

# test-results/**/*.xml
# test-results/**/*.trx
# test-results/**/*.json
files_pattern:
description: test results files to collect and publish
required: true

runs-on:
description: OS to run the action on
large_files:
description: Support for large files is enabled when set to true. Defaults to false, unless ignore_runs is true.
default: "false" # ignore_runs == true
required: false
default: ubuntu-latest

ignore_runs:
description: Does not collect test run information from the test result files, which is useful for very large files. This disables any check run annotations.
default: "false"
required: false

# Set to:
# - always - always comment
# - changes - comment when changes w.r.t. the target branch exist
# - changes in failures - when changes in the number of failures and errors exist
# - changes in errors - when changes in the number of (only) errors exist
# - failures - when failures or errors exist
# - errors - when (only) errors exist
# - off - to not create pull request comments.
comment_mode:
description: The action posts comments to pull requests that are associated with the commit.
required: false
default: always

# same as `check_name``
comment_title:
description: An alternative name for the pull request comment.
required: false
default: Publish Deltas

# Required to be unique for each instance in one workflow.
check_name:
description: An alternative name for the check result.
required: false
default: Publish Deltas

runs:
using: composite
Expand All @@ -22,6 +57,11 @@ runs:
# if: (success() || failure()) && startsWith(${{ inputs.runs-on }}, 'ubuntu') # FIXME
with:
files: ${{ inputs.files_pattern }}
ignore_runs: ${{ inputs.ignore_runs }}
large_files: ${{ inputs.ignore_runs == 'true' }}
comment_mode: ${{ inputs.comment_mode }}
comment_title: ${{ inputs.comment_title }}
check_name: ${{ inputs.check_name }}

# FIXME
# - name: publish-unit-test-result-action @ macos
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/test_actions__junit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ jobs:
with:
files_pattern: ${{ env.FILES_PATTERN }}

os_matrix:
# publish-test-deltas
comment_mode: off

os__matrix:
needs: default
strategy:
max-parallel: 10
Expand All @@ -44,14 +47,18 @@ jobs:
- uses: ./.github/actions/junit
with:
files_pattern: ${{ env.FILES_PATTERN }}

# test-reporter
tests_name: actions/junit:${{ env.REPORTER }} @ ${{ matrix.OS }}

# test-summary
summary_title: actions/junit:Test Summary @ ${{ matrix.OS }}

# publish-test-deltas
# publish-test-deltas: "true"
comment_mode: off

test-reporter_only_list_matrix:
test-reporter_only_list__matrix:
needs: default
strategy:
fail-fast: false
Expand All @@ -72,17 +79,20 @@ jobs:
- uses: ./.github/actions/junit
with:
files_pattern: ${{ env.FILES_PATTERN }}

# test-reporter
reporter: ${{ env.REPORTER }}
tests_name: "actions/junit:${{ env.REPORTER }} list-suites:${{ matrix.list-suites }} list-tests:${{ matrix.list-tests }}"
list-suites: ${{ matrix.list-suites }}
list-tests: ${{ matrix.list-tests }}

# test-summary
summary_title: ""

# publish-test-deltas
publish-test-deltas: "false"

publish-test-deltas_only_matrix:
publish-test-deltas_only__matrix:
needs: default
strategy:
fail-fast: false
Expand All @@ -102,3 +112,4 @@ jobs:
reporter: ""
summary_title: ""
publish-test-deltas: ${{ matrix.publish-test-deltas }}
comment_mode: off # XXX?
87 changes: 85 additions & 2 deletions .github/workflows/test_actions__publish-test-deltas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
- uses: ./.github/actions/publish-test-deltas
with:
files_pattern: ${{ env.FILES_PATTERN }}
comment_mode: off

os_matrix:
os__matrix:
needs: default
strategy:
fail-fast: false
Expand All @@ -43,8 +44,9 @@ jobs:
with:
runs-on: ${{ matrix.OS }}
files_pattern: ${{ env.FILES_PATTERN }}
comment_mode: off

files_pattern_matrix:
files_pattern__matrix:
needs: default
runs-on: ubuntu-latest
strategy:
Expand All @@ -61,3 +63,84 @@ jobs:
- uses: ./.github/actions/publish-test-deltas
with:
files_pattern: ${{ matrix.files_pattern }}
comment_mode: off

comment_mode__matrix:
needs: default
strategy:
fail-fast: false
max-parallel: 10
matrix:
comment_mode:
- always
- changes
- changes in failures
- changes in errors
- failures
- errors
- "off"
runs-on: ubuntu-latest
name: "comment_mode: ${{ matrix.comment_mode }}"
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: ./.github/actions/publish-test-deltas
with:
files_pattern: ${{ env.FILES_PATTERN }}
comment_title: "comment_mode: ${{ matrix.comment_mode }}"
comment_mode: ${{ matrix.comment_mode }}

comment_title__matrix:
needs: default
strategy:
fail-fast: false
max-parallel: 10
matrix:
comment_title:
- "comment_title: Bananas"
- "comment_title: Pijamas"
runs-on: ubuntu-latest
name: ${{ matrix.comment_title }}
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: ./.github/actions/publish-test-deltas
with:
files_pattern: ${{ env.FILES_PATTERN }}
comment_title: ${{ matrix.comment_title }}

check_name__matrix:
needs: default
strategy:
fail-fast: false
max-parallel: 10
matrix:
check_name:
- Checkity
- Checked
runs-on: ubuntu-latest
name: "check_name: ${{ matrix.check_name }}"
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: ./.github/actions/publish-test-deltas
with:
files_pattern: ${{ env.FILES_PATTERN }}
check_name: ${{ matrix.check_name }}
comment_mode: off

ignore_runs__matrix:
needs: default
strategy:
fail-fast: false
max-parallel: 10
matrix:
ignore_runs:
- true
- false
runs-on: ubuntu-latest
name: "ignore_runs: ${{ matrix.ignore_runs }}"
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: ./.github/actions/publish-test-deltas
with:
files_pattern: ${{ env.FILES_PATTERN }}
ignore_runs: ${{ matrix.ignore_runs }}
comment_mode: off
4 changes: 2 additions & 2 deletions .github/workflows/test_actions__test-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
reporter: ${{ env.REPORTER }}
files_pattern: ${{ env.FILES_PATTERN }}

os_matrix:
os__matrix:
needs: default
strategy:
fail-fast: false
Expand All @@ -45,7 +45,7 @@ jobs:
reporter: ${{ env.REPORTER }}
files_pattern: ${{ env.FILES_PATTERN }}

list_matrix:
list__matrix:
needs: default
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_actions__test-summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
files_pattern: ${{ env.FILES_PATTERN }}

os_matrix:
os__matrix:
needs: default
strategy:
fail-fast: false
Expand Down
Loading