Rail workers will strike in July in a dispute over pay, jobs and conditions.