Improving build error reporting
fix issue where build failure summary didn't work on the 'test' action.

By moving this check to the top, we can act on it before it gets caught
by the ('test' || 'run-tests') case.