A covalent bond is a shared pair of electrons. An Ionic bond is electrostatic interactions between oppositely charged ions.
So you have to consider electronegativity. A ball park figure on the pauling scale(of electroneg) of a predominantly ionic bond is a difference of 2.0
Beryllium and Hydrogen have very similar electronegatvities <2.0