crystal-lang / test-ecosystem

7 stars 6 forks source link

Add separate harness for simple tests #45

Closed straight-shoota closed 1 year ago

straight-shoota commented 1 year ago

This adds in a bunch of portable tests for many Crystal libraries. The tests run on Linux, macOS and Windows via bats (Windows needs an environment with Unix tools). A CI workflow runs the test on these three platforms.

This is a very basic implementation. It uses the install-crystal action and does not yet allow to use a custom compiler built. Also there are not yet any provisions for more complex dependencies, like databases required for testing db drivers. These will be added later using portable actions on GitHub CI.

HertzDevil commented 1 year ago

Just wondering, did you test Windows locally with MSYS2 (including Git Bash), MSYS, or Cygwin?

straight-shoota commented 1 year ago

I actually ran tests with WSL. I think this required a bit of extra setup that is probably not necessary for the CI environment. For example inserting the .exe extensions to explicitly target the Windows commands.

I was planning to look into using a more integrated local environment, probably MSYS2 (because that's what GitHub actions is using).