In the real universe, stars that go supernova are very large stars that are short lived, or, they could be white dwarfs that accrue matter and overcome the Chandrasekhar limit.
Very large stars, 8 solar masses or more - about the minimum size for a star that goes supernova, the life span of that star is too short for a planet to form, cool and develop life. The life of an 8 solar mass star is about 8 to the 3rd power or 1/512th the life of our sun. On the order of 20 maybe 30 million years. You can't get a planet to form and have advanced life that quickly.
Now if there's a 2 star system, like lets say, Sirius A and B, the larger star reaches it's red giant stage first prior to becoming a white dwarf and the smaller star keeps burning and in time, clears out much of the red-giant solar nebula left by the first star, then you can have a threat of a supernova binary system where the remaining star feeds the white dwarf, and that star lives long enough for planets to develop life. Binary systems may have some issues, like the planets need to be fairly distant and/or the stars quite close and you have the white dwarf stealing matter from the star, so the star loses mass over time and the white dwarf likely emits intense UV and perhaps gamma rays, but in this way, it's theoretically possible to have a super-nova on the way and have a planet with life on it in orbit around the binary system.
Sirius A & B are actually not a good example. They're too far apart and Sirius A is in the direction of too large and short lived and Sirius B is not expected to go supernova (maybe after Sirius A goes red giant - just maybe - that would put on quite a show if we're still around to see it, but I digress).
More realistic, much more common and just as deadly would be a star going red giant.