The Senate has taken key steps toward passing a funding measure that would keep government operations running and avoid a nationwide shutdown.