-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement half of tests in Bats #1187
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
Conversation
da8d8f8
to
26bd63f
Compare
26bd63f
to
de55275
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a job in the CI to run the bats test? For now, we can run both py and shell until everything is done.
Great! pls replace the ci git-extras/.github/workflows/ci.yml Line 56 in fdaca2c
with the bats, that makes everything done easily. |
It's done! :) cc @vanpipy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, GitHub doesn't clearly show that CI failed to run! It shows all green for me and the only difference is the omission of the "All checks have passed" text. I guess this is part of the new pull request status box they recently rolled out... I made those changes 👍 |
Merged. Thanks! |
This supersedes #1170. As mentioned in the issue that the PR links to, the testing suite is being converted from Pytest to Bash, mostly due to Pytest's poor support for Bash codecov.
I changed the formatting for files in
bats/
because they use a lot of heredocs for improved readability of the stdout content assertions. According to the Bash manual (emphasis mine):This adds the first half of tests just to get things started. The suite can be ran with:
In another PR, I'll rewrite the other half of tests, add documentation, and eventually remove the pytest stuff.
For a more detailed explanation of functions and commands (for those not as familiar with Bats), #1170 contains very verbose details in comments