An ALMA/NOEMA survey of the molecular gas properties of high-redshift star-forming galaxies