Rib Cage Pain...

Okay so for the past maybe a week. I have had some upper rib cage pain. I don't workout. It's a few inches under where my sports bra stops at. is it because of gaining weight? Or something more serious. I sit at a desk all day and I stretch (sitting down and leaning backwards) and that hurts now when I do it. Not sure if I should go to my doctor or not.