The liens provided for in this chapter shall be enforced by an action and shall be governed by the laws regulating the proceeding relating to the mode and manner of trial and the proceeding and laws to secure property so as to hold it for the satisfaction of any lien that may be against it.