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

Test for actual output, not just exit code #35

Open
jspaaks opened this issue Jan 20, 2022 · 8 comments
Open

Test for actual output, not just exit code #35

jspaaks opened this issue Jan 20, 2022 · 8 comments
Assignees

Comments

@jspaaks
Copy link
Member

jspaaks commented Jan 20, 2022

The tests in https://github.com/citation-file-format/cffconvert-github-action/blob/a73af040d6aeb196ca0f696e6fdcc72663c5a96b/.github/workflows/selftest.yml test for exit code. It would be better if we can test for their actual output.

@jspaaks jspaaks added this to the 2.0.0 milestone Jan 20, 2022
@abelsiqueira
Copy link
Collaborator

How do we test a solution? Pushing and checking?

@abelsiqueira
Copy link
Collaborator

Maybe using https://github.com/nektos/act?

@jspaaks jspaaks self-assigned this Jan 20, 2022
@jspaaks jspaaks added the standup To be discussed during the standup label Jan 20, 2022
@jspaaks jspaaks removed their assignment Jan 20, 2022
@jspaaks
Copy link
Member Author

jspaaks commented Jan 20, 2022

Not sure what would be a good way to do this, maybe @sverhoeven can help?

@fdiblen fdiblen self-assigned this Jan 20, 2022
@sverhoeven
Copy link

You could capture the stdout and compare it with a expected output using https://man7.org/linux/man-pages/man1/comm.1.html

@abelsiqueira
Copy link
Collaborator

We are having issues capturing the stdout.

@abelsiqueira
Copy link
Collaborator

The args: passed can't have a > output because the docker cffconvert thinks it is an argument. From what I saw, Faruk and Jurrian tried to get the output from the actions interface, but also could not find a way.

@jspaaks jspaaks removed the standup To be discussed during the standup label Jan 24, 2022
@jspaaks jspaaks removed this from the 2.0.0 milestone Jan 24, 2022
@jspaaks
Copy link
Member Author

jspaaks commented Jan 25, 2022

Might need a composite action.yml or perhaps setting a different entrypoint (to a script that captures the dockerized cffconvert's stdout) could also work:

@abelsiqueira
Copy link
Collaborator

Testing @nlescgt

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

No branches or pull requests

4 participants