-
Notifications
You must be signed in to change notification settings - Fork 113
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
Implement BATS workflow #70
Conversation
Main goals I'm planning to achieve:
I plan on raising separate PRs to facilitate this, which is why I'm raising this as a base for those PRs for now. |
The rationale on targeting Bash 4.2 as a minimum:
The only supported OS shipping with an older Bash is macOS (3.2) which is already too old to support other features in this theme (like associative arrays) - and Homebrew has become the de-facto package manager on this platform - even Github Actions uses it in the base runner instances. With the update to the README reflecting dependency examples, this should be less of a problem moving forward. |
47bd81b
to
e2cd214
Compare
The third-party pre-commit hook for shfmt is considerably out of date, and we need to move to a version that supports BATS formatting. Moving to v3.8.0 and a locally managed hook definition.
Until real tests exist, this stub test will allow the workflow to pass without failure.
Bats has been configured to run on Bash 4.2 and higher, including the dependencies required by this theme and workflow operations. macOS has been set up as a separate runner to confirm functionality of OS-specific features.
Witnessing random additions of recent such as `jq` as dependencies. Keeping track of these is problematic without complete testing, until then the README has been updated to track all known dependencies and instructions for common distros.
e2cd214
to
12fdb7a
Compare
This PR implements the bats test runner as a workflow, providing a stub test to ensure passing until future PRs implement their own.
The purpose of bats for this repo is three-fold functionality testing:
Tests are completely optional, and realistically should only exist for core components where functionality differs between OS flavors (such as the music widget), and non-portable syntax (use of implementation specific features in
bc
,awk
,date
, etc.)Discussion in comments.
Minor changes