**Yes.**

The Ready action specifies that

> When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs.

So when you take the Ready action to ready a spell, you have, in fact, used your action to cast a bard spell.  You have "cast the spell as normal," RAW.  This seems to fulfill the requirements for the bonus action weapon attack.

This presumes that you are readying the spell to be cast sometime after your weapon attack but before your next turn.