Very high-energy gamma -ray observations of novae and dwarf novae with the MAGIC telescopes