Lawmakers race to avert government shutdown ahead of midnight deadline