We consider a one-dimensional run-and-tumble particle, or persistent random walk, in the presence of an absorbing boundary located at the origin. After each tumbling event, which occurs at a constant rate γ, the (new) velocity of the particle is drawn randomly from a distribution W (v). We study the survival probability S(x, t) of a particle starting from x ≥ 0 up to time t and obtain an explicit expression for its double Laplace transform (with respect to both x and t) for an arbitrary velocity distribution W (v), not necessarily symmetric. This result is obtained as a consequence of Spitzer's formula, which is well known in the theory of random walks and can be viewed as a generalization of the Sparre Andersen theorem. We then apply this general result to the specific case of a two-state particle with velocity ±v 0 , the so-called persistent random walk (PRW), and in the presence of a constant drift µ and obtain an explicit expression for S(x, t), for which we present more detailed results. Depending on the drift µ, we find a rich variety of behaviours for S(x, t), leading to three distinct cases: (i) subcritical drift −v 0 < µ < v 0 , (ii) supercritical drift µ < −v 0 and (iii) critical drift µ = −v 0 . In these three cases, we obtain exact analytical expressions for the survival probability S(x, t) and establish connections with existing formulae in the mathematics literature. Finally, we discuss some applications of these results to record statistics and to the statistics of last-passage times.