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
20 changes: 14 additions & 6 deletions .github/actions/junit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ inputs:
required: false
default: failed

publish-test-deltas:
description: Publish test deltas
required: false
default: "true"

# publish-test-deltas inputs
runs-on:
description: The OS to run the action on.
Expand All @@ -41,9 +46,14 @@ inputs:
runs:
using: composite
steps:
- run: echo "Preparing percebus/github-actions-testing/.../actions/junit..."
# NOTE: Force even if npm test failed
if: success() || failure()
shell: bash
name: Run junit action

- uses: percebus/github-actions-testing/.github/actions/test-reporter@main
# TODO add successOrFail
if: ${{ inputs.files_pattern != '' }}
if: ${{ inputs.reporter != '' }}
with:
name: ${{ inputs.tests_name }}
reporter: ${{ inputs.reporter || 'jest-junit' }}
Expand All @@ -52,15 +62,13 @@ runs:
list-tests: ${{ inputs.list-tests }}

- uses: percebus/github-actions-testing/.github/actions/test-summary@main
# TODO add successOrFail
if: ${{ inputs.files_pattern != '' }}
if: ${{ inputs.summary_title != '' }}
with:
title: ${{ inputs.summary_title }}
files_pattern: ${{ inputs.files_pattern || 'INVALID' }}

- uses: percebus/github-actions-testing/.github/actions/publish-test-deltas@main
# TODO add successOrFail
if: ${{ inputs.files_pattern != '' }}
if: ${{ inputs.publish-test-deltas == 'true' }}
with:
runs-on: ${{ inputs.runs-on }}
files_pattern: ${{ inputs.files_pattern || 'INVALID' }}
39 changes: 34 additions & 5 deletions .github/workflows/test_actions__junit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ jobs:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- 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 }}
files_pattern: ${{ env.FILES_PATTERN }}
# publish-test-deltas
# publish-test-deltas: "true"

list_matrix:
test-reporter_only_list_matrix:
needs: default
strategy:
fail-fast: false
Expand All @@ -67,9 +71,34 @@ jobs:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: ./.github/actions/junit
with:
tests_name: "actions/junit:${{ env.REPORTER }} list-suites:${{ matrix.list-suites }} list-tests:${{ matrix.list-tests }}"
summary_title: ""
reporter: ${{ env.REPORTER }}
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:
needs: default
strategy:
fail-fast: false
max-parallel: 10
matrix:
publish-test-deltas:
- "true"
- "false"

name: "publish-test-deltas: ${{ matrix.publish-test-deltas }}"
runs-on: ubuntu-latest
steps:
- uses: percebus/github-actions-common/.github/actions/checkout@main
- uses: ./.github/actions/junit
with:
files_pattern: ${{ env.FILES_PATTERN }}
reporter: ""
summary_title: ""
publish-test-deltas: ${{ matrix.publish-test-deltas }}
Loading