Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Run tests on macOS
Previously we did not run unit tests on macOS. I don't know all the history but I will assume that was because the macOS runners were not available early on, or were otherwise difficult to use.
It seems relatively unlikely that there would be macOS-specific bugs we could discover that aren't more broadly Unix bugs (i.e. bugs that would be surfaced through Linux tests).
Regardless, the reality is that the products downstream of HCL, such as Terraform, do have macOS user base and we regularly run tests on macOS, so it would seem reasonable to also do it here.
Read Go version from
go.mod
While strictly speaking the version in
go.mod
is compatibility constraint, we always seem to test against that version, i.e. there is no difference in practice between the version we claim compatibility with and the version we test against.We could start testing additionally against newer Go versions too but I was trying to keep this PR small in scope, to keep the review easier.