The “War Magic” ability allows such characters to cast a cantrip as an action and attack as a bonus action. You can, if the cantrip is cast as a bonus action, as A A noted.
How do I cast my cantrips as a bonus action?
If you cast a cantrip or leveled spell as a bonus action, then your action must not be a leveled spell. Indeed, conversely, with Clerics and spiritual weapon, you want to do the opposite, so cast a cantrip as your action and spirtual weapon (a levelled spell) as your bonus action.
Can you make an attack as a bonus action?
No general rule allows you to insert a bonus action between attacks in a single action. You can interrupt a multiple-attack action with a bonus action/reaction only if the trigger of the bonus action/reaction is an attack, rather than the action.
Can a cantrip be used as an extra attack?
Casting a spell uses the Cast a Spell action, not the Attack action. Therefore you can’t cast a spell as your extra attack.
Can you cast more than one Cantrip per turn?
Yes. The rule for casting any spell with a bonus action says that the only other spells you may cast that turn are cantrips with an action. That’s not accurate. The rule is you can only cast one leveled spell per turn except for Action Surge. Whether it’s cast with a bonus action or action is irrelevant.
Can a cantrip like Firebolt count as an attack?
Although Firebolt involves “an attack”, it is not the Attack action. 2.) You said you wanted to attack, get a bonus attack, and then attack again “doing the same thing” (presumably from War Magic, which lets you attack with a bonus action when you use an action to cast a cantrip).
Can you cast a cantrip with spiritual weapon?
Since spiritual weapon requires no concentration it makes it a very good spelll. So you could keep concentration on Bless to buff up you and two friends, attack with spiritual weapon and cast a cantrip. Or you could do a melee attack in lieu of the cantrip.