According to the Lead Game Designer, you can ready the spell
Jeremy Crawford, lead game designer, has mentioned this scenario in an unofficial ruling (a tweet):
You can ready any spell that has a casting time of 1 action. None of the spell's effects, including those of green-flame blade and booming blade, occur until you release the spell.
Upon being asked specifically about the "as part of the action used to cast this spell" phrase he replied:
Those spells are oddballs.
This is only an example of how the rules were intended to function and not the Rules As Written.
Rules As Written there is no reason to ready the spell
Technically you can ready it, it is a spell with a casting time of 1 action, but this spell includes the phrase:
As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell's range, otherwise the spell fails.
The action used to cast the spell is indeed the Ready action. But the ready action states:
[...] When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs [...]
Thus we know that this readying the spell counts as casting the spell, you simply haven't released it yet. This means you have to make the melee attack when you ready the spell. However, we also know that a spell's effects cannot occur until you release the spell. This leaves us with two interpretations:
Making the attack is an effect of the spell and thus we can't even do that.
Making the attack is not an effect of the spell but the bonus damage and whatnot are. This means we would be holding the spell but nothing would happen if we released it (using our reaction). This is because the later effects of the spell only apply when you hit, but that has already happened, so releasing the spell won't do anything.
In either case there is no reason to ready this spell.