Seven Republicans joined Democrats to vote against a funding bill that would prevent a government shutdown.