一贯 is more formal than 一直 (yīzhí, always). 一贯 emphasizes consistency of a principle, policy, or character trait, while 一直 simply means 'continuously/all along.'
usage
Compare: 一贯 (consistent, principled), 一直 (continuously, all along), 始终 (from beginning to end). 一贯 has the strongest connotation of unwavering principle.