The Prophet ﷺ said, "Hasten to perform good deeds before trials come like patches of a dark night, when a man will wake up as a believer and go to sleep as a disbeliever, or go to sleep as a believer and wake up as a disbeliever, selling his faith for a small worldly gain."
حدثنا عبد الرحمن حدثنا زهير عن العلاء عن أبيه
عن النبي ﷺ قال بادروا بالأعمال فتنا كقطع الليل المظلم يصبح الرجل مؤمنا ويمسي كافرا ويمسي مؤمنا ويصبح كافرا يبيع دينه بعرض من الدنيا قليل
Its isnad is sahih. Muslim (1:44) and Tirmidhi (3:220-221) also related it, both through Ala bin Abdul-Rahman, from him. Tirmidhi said, this hadith is hasan sahih. See also what preceded in the Musnad of Saeed bin Zayd, 1647.