The House of Representatives passed a spending bill that funds the federal government through May 5, avoiding a government shutdown.