Does evolving your buddy retain the amount of walking you have done thus far?
If I make an Eevee my buddy and after walking 2km I then decide to evolve the Eevee, will the 2km of walking we've done together be retained or will it reset?
Apparently there is a bug that actually does reset your progress when you evolve.
According to this site's report:
When you walk your Pokemon and obtain enough Poke Candy to evolve them, your Pokemon’s progress gets reset if you evolve them before receiving the reward. There’s numerous reports on this issue, however we are unsure if this is a flaw, or if this is supposed to be this way.
Photographic evidence:
It's worth noting that (based on the picture), the total distance does not reset. Only the current progress towards the next reward does.