US Congress reaches deal to avert with partial shutdown