A class action lawsuit has been filed against mining giants BHP and Rio Tinto on behalf of thousands of female workers.