How can we live a life of steadfast righteousness without compromise?
The concept of righteousness starts with the character of God. God is righteous, He always acts in accordance with what is right and just (the word ‘just’ comes from the same word in Hebrew and Greek as ‘righteous’). Moses praises him as such in Deuteronomy 32:3-4 “3 I will proclaim the name of the Lord. Oh, praise the greatness of our God! 4 He is the Rock, his works are perfect, and all his ways are just. A faithful God who does no wrong, upright and just is he.” Because God is consistently righteous, he is therefore the standard by which all other acts are measured and he has the authority to tell us what is right. The Lord says this of himself in Isaiah 45:19: “I, the Lord, speak the truth; I declare what is right.”
For us to be truly righteous, we must act in obedience to what God says is right, we must display the same kind of character that he displays. However, we know that this is impossible for us. We are unrighteous in every way, even our good deeds are filthy rags in his sight. “6 All of us have become like one who is unclean, and all our righteous acts are like filthy rags; we all shrivel up like a leaf, and like the wind our sins sweep us away.” Isaiah 64:6. We see from this verse that our unrighteousness, our sins, have brought the judgement of the God down on us, he must punish us because He is just and that is what our deeds deserve.
All of this is background to your question. We cannot display righteousness that is steadfast on our own, and we compromise all the time in order to do evil. We quite simply cannot meet God’s standard. This is why the Gospel is such good news. Through Christ’s death on the cross, those who have faith in Him have their sins washed away and receive the gift of His righteousness. From that point on, we are declared righteous in the sight of God. “To the man who does not work but trusts God who justifies the wicked, his faith is credited as righteousness.” Romans 4:5.
Then, in answer to the heart of your question; through the power of the Holy Spirit, we can do acts that are pleasing to Him and consistently display the kind of character he approves of. Titus 3:3-8 speaks of this transformation: “3 At one time we too were foolish, disobedient, deceived and enslaved by all kinds of passions and pleasures. We lived in malice and envy, being hated and hating one another. 4 But when the kindness and love of God our Saviour appeared, 5 he saved us, not because of righteous things we had done, but because of his mercy. He saved us through the washing of rebirth and renewal by the Holy Spirit, 6 whom he poured out on us generously through Jesus Christ our Saviour, 7 so that, having been justified by his grace, we might become heirs having the hope of eternal life. 8 This is a trustworthy saying. And I want you to stress these things, so that those who have trusted in God may be careful to devote themselves to doing what is good. These things are excellent and profitable for everyone.”