-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yaml
41 lines (34 loc) · 1.14 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# SPDX-FileCopyrightText: 2022-2025 Paul Colby <[email protected]>
# SPDX-License-Identifier: MIT
name: Summarize Test Results
author: Paul Colby
description: Summarise TAP (Test Anything Protocol) test results
inputs:
path:
description: One or more paths to TAP files
required: true
default: '**/*.tap'
summary-file:
description: File to append TAP summary to
required: false
outputs:
summary-file:
description: File TAP summary was appended to
value: ${{ steps.tap.outputs.summary-file }}
runs:
using: composite
steps:
- run: |
set -o errexit -o noclobber -o nounset -o pipefail
[[ -z "$(shopt globstar 2> /dev/null)" ]] && echo 'Shell does not support globstar' || shopt -s globstar
: "${SUMMARY_FILE:=$GITHUB_STEP_SUMMARY}"
paths=(${{ inputs.path }}) # Expand globs, and trim whitespce.
gawk --file "$GITHUB_ACTION_PATH/summary.gawk" --sandbox -- "${paths[@]}" >> "$SUMMARY_FILE"
echo "summary-file=$SUMMARY_FILE" >> "$GITHUB_OUTPUT"
shell: bash
env:
SUMMARY_FILE: ${{ inputs.summary-file }}
id: tap
branding:
color: green
icon: check