feat(*): Add test_command input and exclude release tagged tests for pull request #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Issue
Fixes #30
How This PR Solves The Issue
bats tests --filter-tags !release
With this, if the add-on test is tagged with the "release" tag, it won't be executed on pull request workflow:
On other workflow ("schedule", "push", etc.), the test command will be, by default, as before :
bats tests
If an add-on maintainer needs to pass a customized test command, there is a new available string input
test_command
.When the
test_command
input is not empty, it will be used to run the test.Manual Testing Instructions
To test the final behavior, you can use my forked action and points to the last commit:
How to test
Backward compatibility : Create a pull request on your add-on: If you have no "release" tagged test, all test should be run as before
Exclude "release" test: Tag a test with the "release" tag. This test should not be executed on PR workflow.
Customized test_command: Use the
test_command
input to see if your customized test command is launched.backward compatibility (hard to test: you can modify the tests.yml workflow to be triggered during a push on a testing branch that contains the new action). Ensure that the launched command, for a non pull request workflow, is as before (
bats tests
) and that all tests are runned.