The Senate on Friday passed a Republican-led stopgap measure to keep the government funded ahead of a midnight deadline.