Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add matched files to output #24

Merged
merged 7 commits into from
Nov 8, 2021
Merged

feat: add matched files to output #24

merged 7 commits into from
Nov 8, 2021

Conversation

nbrugger-tgm
Copy link
Contributor

Gives the developer the option to use (or even iterate) over the list of changed files

@tony84727
Copy link
Owner

LGTM and thank you for the contribution!
Do you mind adding a test for the new output variable {ruleName}_files?
I'm thinking of adding a check of the new variable here:

Case: When the rule matched files are not modified, the value of the variable should be empty (right?).

- name: Check Output
run: '[[ "${{ steps.filter.outputs.test }}" = "false" ]]'

and here:

Case: When the rule matched files are modified, the value should be a space-separated list of rule matched changed files.

- name: Check Output
run: '[[ "${{ steps.filter.outputs.test }}" = "true" ]]'

I realized it's not convenient to write tests in github action like that. I was thinking of moving the integration test cases from github workflow to jest if possible.

So whether to add the tests in this PR is up to you, or you can leave it to me.

@nbrugger-tgm
Copy link
Contributor Author

Hi, I can indeed add tests in form of the test-workflow you posted.
Will have a look into how to do it and add it to this PR.

And yes testing GitHub actions is pain indeed and a problem i also didn't managed to solve

@nbrugger-tgm
Copy link
Contributor Author

@tony84727 tony84727 merged commit d384770 into tony84727:master Nov 8, 2021
@tony84727
Copy link
Owner

Merged, Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants