We're going on a cruise in a month on Celebrity and they sent us an email with a link to Optum to order a self-administered test. They even are supposed to include live video instruction on using the results. This was for vaccinated passengers, of course, and it ran about $70 for 2 tests.
Optum Store | Optum Store Not sure if this would for for other cruise lines but maybe you can check out Optum's website to find out.