How to build a Ballerina project with tests

60 Views Asked by At

Is there a recommended approach for building the ballerina project only if the test cases are passing? bal build command does not execute test cases prior to build the project.

Currently I tried executing bal test first and then bal build to verify that the test cases are passing. Is there a straight forward way to do this rather than doing it in two individual steps.

1

There are 1 best solutions below

0
On

The recommended way to run tests before build is to run bal test and then bal build. There is no straight forward method to do this so running them in two individual steps is the recommended approach.

Related spec discussion: https://github.com/ballerina-platform/ballerina-spec/issues/966#issuecomment-954157263