How to add DB to Action yaml?

I am not sure what I need to add to the yaml to make it pick up my DB connection.
I have a Java with Maven workflow but my build fails with ‘no connection’.

I also wish to add my CodeCov to my yaml and but again, I don’t know how.

Any info would be greatly appreciated. Thanks.