Racist really isn't the right word. Sparta wouldn't have a concept of "race." It was an extreme oligarchy based on the persecution and terrorization of the Helots, 90% of the population for the benefit of the elite 10%, a system everyone was born into. But there was the possibility of being "freed" or of a Spartan to lose their citizenship, making it not equivalent to racism. It was inherently vile, deadly, and is unfairly revered in the modern day in a way that is quite disturbing, but racist is simply not the right word.