Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coerce matrix.continue-on-error to bool in CI workflow
Since the `matrix.continue-on-error` setting is only ever defined for nightly Rust build jobs, all other jobs will trigger a CI error if they fail: ``` Error: Process completed with exit code 101. Error: .github/workflows/rust.yml (Line: 31, Col: 26): Unexpected value '' Error: The step failed and an error occurred when attempting to determine whether to continue on error. Error: The template is not valid. .github/workflows/rust.yml (Line: 31, Col: 26): Unexpected value '' ``` The output above indicates that `matrix.continue-on-error` defaults to an empty string if it's not explicitly defined for the current job in the matrix. The `continue-on-error: ${{ matrix.continue-on-error }}` evaluation then fails due to expecting a `bool` value. I've tried specifying a default value of `continue-on-error: [false]` in the matrix, but attempting to override this default setting using `include` just creates more build jobs with `continue-on-error: true` instead of overriding the setting for the existing ones, which isn't what we want. The solution I found was to append `|| false` to the end, which coerces the type to `false` if the setting is undefined for the current job. This suppresses the error message and produces the original expected behavior.
- Loading branch information