Against Algeria: '62 and '64
Against Algeria (POLISARIO): '75-'91 this was a guerilla war so the war didn't continue every day but since '91 the POLISARIO was made incapable to conduct any attacks anymore on Moroccan positions.

"Narrated ibn Mas'ood (may Allah be pleased wit him): Allah's
Messenger(pbuh) said, "ruined are those who insist on hardship in matters of faith." He repeated this 3 times!."

[Saheeh Muslim]