First one is perfect! But you could change the meaning by having both in the continuous tense to stress that two events were happening at the same time...
I WAS WALKING AND IT WAS RAINING...
The first is an example of an interrupted action, WALK WALK WALK, then at some point, RAIN.