Tentative agreement reached to avoid partial government shutdown