How to Run Integration Tests Against a Live Azure SQL Database in GitHub Actions for .NET Projects?

Kiran Pradeep 25 Reputation points
2025-09-12T05:51:34.83+00:00

I'm working on a .NET 8 API that connects to Azure SQL. I want to run integration tests against a temporary Azure SQL instance during the GitHub Actions workflow.

Has anyone successfully done this without hard coding credentials or leaving resources running? What’s the best pattern to:

Provision an Azure SQL DB on workflow start

Run integration tests

  • Tear down the DB safely afterwards?
Azure SQL Database
0 comments No comments

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    4 deleted comments

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.