Neither are wrong, you can either repeat it or omit it.
However, the version without the repeated pronoun will sound a lot more formal or literary. It's more something you'll read in a book. In casual oral context, it would sound strange, as the pronoun tends to always be repeated.
> book version (I switched to passé simple because your use of imparfait was a bit out of place here, like Jerry said in his insightful comment)
J'allai au marché, regardai des vêtements, puis achetai un café.
> a possible casual version (same remark for imparfait, but passé simple is almost never employed orally, rather passé composé)
Je suis allé au marché, j'ai regardé des fringues, et j'ai acheté un café.