Repository navigation
chore(ci): run toys ci under bash so the Windows leg tests again - #36609
Conversation
On windows-latest the default run shell is pwsh, where "$VAR" reads an unset PowerShell variable instead of the environment variable. Since #36206 moved the event values into env:, the Windows leg has passed empty --github-event-name/--github-event-payload values to toys ci, which then falls back to a local diff and tests nothing. Set shell: bash on the step. Linux and macOS already default to bash. Also quote the event variables.
quartzmo
left a comment
There was a problem hiding this comment.
LGTM. This matches what google-auth-library-ruby, google-api-ruby-client, and ruby-cloud-env already do.
One potential thing to watch out for:
The Windows leg has been testing zero gems since #36206, and that includes the nightly. The 10/05 nightly (https://github.com/googleapis/google-cloud-ruby/actions/runs/37286169747) logs "Using local commits" and "No gem directories changed." on Windows.
Once this PR merges, the next nightly (08:21 UTC) should run every gem on Windows for the first time in a couple months.
It might be good to proactively kick off a workflow_dispatch of CI on main with flags: --all-gems right after merging this PR, and triage any issues. Same for ruby-spanner.
Here are the results (all gems ran, all green): https://github.com/googleapis/google-cloud-ruby/actions/runs/37705401562/job/113078458268 |
#36206 moved
${{ github.event_* }}(resolved by GitHub before the shell runs) intoenv:variables resolved by the step's shell. Because this step runs across a multi-OS matrix (ubuntu-latest,macos-latest,windows-latest), Linux/macOS default tobash(${VAR}) while Windows defaults topwsh($env:VAR). Onwindows-latest,${GITHUB_EVENT_*}resolved as unset local PowerShell variables (""), causingtoys cito silently skip all tests (before vs. after).Since no single env-var syntax resolves in both
bashandpwsh, this setsshell: bashso"${GITHUB_EVENT_*}"resolves across all matrix OSes.Companion PRs: googleapis/ruby-core-libraries#78, googleapis/ruby-spanner#257, googleapis/common-protos-ruby#436.