Likewise we have a cruise from Barcelona in September. Celebrity demand supervised tests. Previously have used Fit to Flytests which are accepted by Celebrity. These maybe only of use to UK resident.
https://www.projectscreen.co.uk/virgindelta/
https://qured.com/health-travel-pass#our-rapid-antigen-fit-to-fly-test
US citizens:
https://store.optum.com/shop/products/abbott-binaxNOW-COVID-19-ag-emed-at-home-test-kit-1-pack/
However maybe easier booking a test with Turo Park Clinics. Their clinic is central and they seem to offer other places for antigen tests too. I have no experience of them so will be interested to find out how people get on.
https://turoparkmedical.com/covid-test-in-barcelona/
https://www.barcelona-tourist-guide.com/en/barcelona/covid/test/antigen-test/schblt-clinic-in-sagrada-familia-barcelona-01.html
https://pcrpriser.se/en/spain/barcelona