South Africa batsman JP Duminy will be out of action for up to six months after rupturing his Achilles.