Uhhh fails? That depends on both the defense of whatever you are hitting. The stronger they are the more troops/spies you use. Usually for spies its the same as if you were winning, but troops can be anywhere from 5% to 15% per hit.
Yeah if I fail a spy action, usually I lose the same amount of spies, but on a troop action, I lose 3x the normal amount of troops I would use for a success. So for spies-usually 36 actions. Troops-8-9 actions