bazel-contrib / rules-template

A template for creating a new Bazel ruleset
Apache License 2.0
78 stars 20 forks source link

chore: run windows/mac tests only on main #53

Closed alexeagle closed 1 year ago

alexeagle commented 1 year ago

Prevents us exhausting GitHub Actions quota on PRs since MacOS is 10x the cost

gregmagolan commented 1 year ago

$GITHUB_WORKSPACE (used in bazel test ... step) doesn't work on Windows. The fix is to use ${{ github.workspace }} (https://github.com/aspect-build/rules_esbuild/blob/abf0528384474f3b59733594e1f644b214c2a0ff/.github/workflows/ci.yaml#L135)

And the test.sh step needs to be excluded when running on Windows. For example, https://github.com/aspect-build/bazel-lib/blob/5faf59e8a6632663a7eeb6defff244afdadde0c0/.github/workflows/ci.yaml#L216