I just finished the first season of the anime and this question has been bugging me. There's no obvious incentive for him not to tell Akane, and Ryoga doesn't have any dirt on Ranma to use as collateral as far as I can remember. So why didn't he spill it?
Here is my thought. Because Ryouga will be hurt, if Ranma spills it. I don't think Akane will hate Ryouga even if she knows that he's P chan, from her personality, she may be angry for a few days but that's it. But to Ryouga, he kept thinking that if Akane finds out that he's P chan, she will hate him. It can be seen in a few occasion where Ranma threatens him that he will spill it out.
But after all, Ranma is Ryouga's friend. He wouldn't do this if he knows that it's gonna hate Ryouga.