The first two sentences are no good. I'd probably say something like Although my teacher didn't catch me cheating on the test, I felt bad about my foolish behaviour.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.