Giter Site home page Giter Site logo

tap-summary's Introduction

TAP Summary

Automatic Tests

GitHub Action for summarising TAP (Test Anything Protocol) test results. It summarises a collection of TAP files (such a produced by Qt Tests), and writes the result as a Markdown table to the GitHub step summary by default, or some other destination file if overridden.

Usage

- uses: pcolby/tap-summary@v1

Note, this will use a default path of **/*.tap, which depends on Bash's globstar support, which is not available on macOS's default Bash (which is really old). For macOS, either provide paths that don't depend on globstar, or upgrade Bash (eg via brew). This is not necessary for Linux and Windows.

Inputs

path

One or more paths to TAP files. This will undergo Bash expansion, so things like environment variables can be used, and must be quoted or escaped as appropriate.

Defaults to **/*.tap.

- uses: pcolby/tap-summary@v1
  with:
    path: >-
      path/to/tap-file
      'path/to a file with spaces.tap'
      path/with/globstar/**/*.tap
    summary-file: path/to/output/file.md

summary-file

The file to append the test summary to. Defaults to $GITHUB_STEP_SUMMARY.

- uses: pcolby/tap-summary@v1
  with:
    summary-file: path/to/output/file.md

Outputs

summary-file

The file the test summary was appended to. This is mostly just for automated tests, where it allows the invoking workflow job to check the summary output when the input summary-file is defaulted.

tap-summary's People

Contributors

dependabot[bot] avatar pcolby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ericoporto

tap-summary's Issues

Does not appear to do anything

I get this output:

Run pcolby/tap-summary@v1
  with:
    path: /tmp/*.tap
  
    summary-file: tap_summary.md
Run set -o errexit -o noclobber -o nounset -o pipefail
  set -o errexit -o noclobber -o nounset -o pipefail
  [[ -z "$(shopt globstar [2](https://github.com/Buzztrax/buzztrax/actions/runs/7856445010/job/21439210478#step:9: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 -- /tmp/*.tap
   >> "$SUMMARY_FILE"
  echo "summary-file=$SUMMARY_FILE" >> "$GITHUB_OUTPUT"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    SUMMARY_FILE: tap_summary.md
|       Test result       | Passed | Failed | Skipped | Test name |
|:------------------------|-------:|-------:|--------:|:---|
| :heavy_check_mark: pass |      0 |      0 |       0 | 2  |
| :heavy_check_mark: pass |      0 |      0 |       0 | ok |

example tap file from /tmp/*.tap (you can download the artifact.zip from the linked build too):

ok 1 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bml_setup: Passed
ok 2 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bml_finalize: Passed
ok 3 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bmln_master_info: Passed
ok 4 - tests/lib/bml/e-core.c:BmlCoreExamples:test_bmln_open: Passed
ok 5 - tests/lib/bml/e-class.c:BmlClassExamples:test_bmln_get_machine_info: Passed
1..5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.