cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

What is a good way to implement unit tests using github actions for databricks?

Ullsokk
New Contributor III

I am trying to use a git template for unit tests on a databricks project. The framework uses pylint, pytest and black to check the code. But I am having a lot of trouble getting the github actions vm to run the code without issues. I have had issues with spark and hadoop versions, packages, java errors. Is it even a good idea to have github actions fire up a vm that is identical to my databricks environment and test the code? Is there another more sensible approach, such using the run-notebook action instead? Should I look into some completely different framework for doing unit tests?

2 REPLIES 2

Anonymous
Not applicable

@Stian Arntsenโ€‹ :

Using GitHub Actions can be a tedious way to run unit tests for the reasons you have mentioned above.

You can use an another approach to do this. Use the run-notebook action to run your unit tests. This action allows you to specify a Databricks notebook to run and the cluster to run it on. You can configure the notebook to execute your unit tests and report the results back to GitHub. This approach may be simpler and more reliable than trying to replicate your entire Databricks environment on a GitHub Actions VM

Anonymous
Not applicable

Hi @Stian Arntsenโ€‹ 

Hope everything is going great.

Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you. 

Cheers!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group