Joshua 23:7
That ye come not among these nations, these that remain among you; neither make mention of the name of their gods, nor cause to swear by them, neither serve them, nor bow yourselves unto them: That ye come not among these nations, these that remain among you; neither make mention of the name of their gods, nor cause to swear by them, neither serve them, nor bow yourselves unto them:
Joshua 23:7 belongs to Joshua's final appeal to Israel after the conquest, when many Canaanite nations still remained among them. It forbids any religious association with those nations, including forming allegiance with them, mentioning or invoking the names of their gods, swearing by them, showing them even the least respect, serving them, bowing to them, or joining their worship.
The prohibition extends beyond worship to close ties such as intermarriage and every connection that could draw Israel toward idolatrous abominations. Israel was to avoid exposure to corrupting influence, shunning even the appearance of evil rather than approaching the borders of sin. Such contact was dangerous because familiarity with idolatry weakens abhorrence of it and leads to idolatry, departure from God, ruin and desolation, and God's displeasure.
God is as faithful to carry out His warnings as He is to fulfill His promises. The warning applies to each person today as a call to avoid relationships and situations that could corrupt faith and lead away from God.