From 0959cbe1d4422e62afc65778cdaea6716c41d936 Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Fri, 16 Feb 2024 12:39:51 +1100 Subject: [PATCH] Add support for non-preferred block scalars Squashed commit of the following: commit 41468aa5a3e6b2d2ce0c3d29dde417651196c99e Merge: 962483d 4cd6558 Author: Paul Colby Date: Fri Feb 16 12:36:52 2024 +1100 Merge branch 'main' into block-scalars commit 962483d79fb213653dbdbd0422e8cbe640461a1a Author: Paul Colby Date: Fri Feb 16 12:28:27 2024 +1100 Handle excess whitespce in input paths commit 674881976781139bce0b8dc823d30a6b6ef9c808 Author: Paul Colby Date: Fri Feb 16 12:16:55 2024 +1100 Use a unqiue step ID commit a7162a5c7ff00d7a5cbbdd2d2085469d93014f76 Author: Paul Colby Date: Fri Feb 16 12:12:15 2024 +1100 Add test (should break a la TDD) --- .github/workflows/test.yaml | 16 ++++++++++++++++ CHANGELOG.md | 9 +++++++-- action.yaml | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 237ee36..fc3e389 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -64,6 +64,22 @@ jobs: path: >- ./test/qtpokit-2554496971/test-results-linux-clang/test/unit/*.tap ./test/qtpokit-2554496971/test-results-linux-gcc/test/unit/*.tap + id: scalar + - name: Check result + run: diff ${EXTRA_DIFF_ARGS:-} --unified ./.github/workflows/expected/path.md "$SUMMARY_FILE" + shell: bash + env: + SUMMARY_FILE: ${{ steps.scalar.outputs.summary-file }} + + - name: Reset step summary + run: '> "$GITHUB_STEP_SUMMARY"' + shell: bash + - name: Test block scalars with new lines + uses: ./ + with: + path: | + ./test/qtpokit-2554496971/test-results-linux-clang/test/unit/*.tap + ./test/qtpokit-2554496971/test-results-linux-gcc/test/unit/*.tap id: path - name: Check result run: diff ${EXTRA_DIFF_ARGS:-} --unified ./.github/workflows/expected/path.md "$SUMMARY_FILE" diff --git a/CHANGELOG.md b/CHANGELOG.md index 6783854..8459b82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.1.1] (2024-02-16) + +### Added + +- Support for non-preferred block scalars (eg `|` or `>+` instead of `>-`). ## [1.1.0] (2024-02-11) @@ -30,7 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support for summarising [Qt Test] [TAP] files. - Automated tests on all supported GitHub-hosted runners (`macos-*`, `ubuntu-*` and `windows-*`). -[unreleased]: https://github.com/pcolby/tap-summary/compare/v1.1.0...HEAD +[unreleased]: https://github.com/pcolby/tap-summary/compare/v1.1.1...HEAD +[1.1.1]: https://github.com/pcolby/tap-summary/releases/tag/v1.1.1 [1.1.0]: https://github.com/pcolby/tap-summary/releases/tag/v1.1.0 [1.0.1]: https://github.com/pcolby/tap-summary/releases/tag/v1.0.1 [1.0.0]: https://github.com/pcolby/tap-summary/releases/tag/v1.0.0 diff --git a/action.yaml b/action.yaml index c5455cf..bbfd310 100644 --- a/action.yaml +++ b/action.yaml @@ -28,7 +28,8 @@ runs: 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}" - gawk --file "$GITHUB_ACTION_PATH/summary.gawk" --sandbox -- ${{ inputs.path }} >> "$SUMMARY_FILE" + 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: