Oil has been slowly pushing higher after being stuck near $40 a barrel since early June following a rapid rebound from a plunge below zero.