A GitHub action for running Fishtape tests.
Here's an example from the test workflow for Pond:
This action requires fish shell. You can install it using the fish-shop/install-fish-shell action.
Add a uses
step to your GitHub workflow as shown below:
- name: Run Fishtape tests
uses: fish-shop/run-fishtape-tests@v2
By default, all files under $GITHUB_WORKSPACE
with a .fish
file extension are tested. To override the default behaviour, provide one or more space-separated pattern values to the patterns
input. For example, to test all .fish
files starting in the tests
directory and descending into subdirectories:
- name: Run Fishtape tests
uses: fish-shop/run-fishtape-tests@v2
with:
patterns: tests/**.fish
Each pattern value may include wildcards and/or brace expansion:
- name: Run Fishtape tests
uses: fish-shop/run-fishtape-tests@v2
with:
patterns: tests/*.fish fixtures/**.fish {dir1,dir2}/**.fish ???-*.fish
Important
The ?
wildcard character is deprecated and can be disabled via the fish
feature flag qmark-noglob
. Support for the ?
wildcard may therefore be dependent upon the version of fish
shell in use and/or the configuration of its feature flags.
By default, TAP output is piped to tap-diff for improved readability. To disable this functionality and produce raw TAP output set raw-output
to 'true'
:
- name: Run Fishtape tests (raw TAP output)
uses: fish-shop/run-fishtape-tests@v2
with:
patterns: tests/**.fish
raw-output: 'true'
Configure the action using the following inputs:
Name | Description | Default |
---|---|---|
patterns |
A space-separated list of file patterns to match against when running tests; each pattern may include wildcards and/or brace expansions | **.fish |
raw-output |
The string value 'true' or 'false' indicating whether to generate raw TAP output or not; output is prettified using tap-diff when 'false' |
false |
title |
The title to display in the job summary; can be used to distinguish multiple summaries generated from a single workflow | Test results |
The following outputs are made available to subsequent steps in a workflow:
Name | Description |
---|---|
total |
The total number of tests run |
passed |
The number of tests that passed |
failed |
The number of tests that failed |
This action generates a job summary at run-time which can be viewed from the workflow run summary page:
Use one of the following patterns when specifying the version reference for this action in your workflow (i.e. the {ref}
value in uses: fish-shop/run-fishtape-tests@{ref}
):
Pattern | Example | Description |
---|---|---|
vX |
v1 |
the latest v1.* release including non-breaking changes and bug fixes |
vX.Y |
v1.1 |
the latest v1.1.* release including bug fixes |
vX.Y.Z |
v1.1.0 |
the v1.1.0 release only |
Tip
The recommended pattern is vX
(e.g. v1
). This will ensure that the version of the action used in your workflow includes the latest non-breaking changes and bug fixes, and guarantees compatibility with previous versions of that major release number.
Using a main
branch reference in your workflow is not recommended as this branch may include breaking changes intended for the next major release.
A number of related composite actions are also available from the fish-shop 🐟. Check them out:
- fish-shop/indent-check - A GitHub action for checking indentation in fish shell files
- fish-shop/install-fish-shell - A GitHub action for installing fish shell
- fish-shop/install-plugin - A GitHub action for installing fish shell plugins
- fish-shop/install-plugin-manager - A GitHub action for installing a fish shell plugin manager
- fish-shop/syntax-check - A GitHub action for syntax checking fish shell files
- Fish market icon made by Freepik from www.flaticon.com
fish-shop/run-fishtape-tests
is provided under the terms of the MIT License.
Email me at marc.ransome@fidgetbox.co.uk or create an issue.