mardi 25 février 2020

Compile and unit test swift code on ubuntu machine

Currently, creating a website that should have the functionality to compile and unit test the swift code. The backend is using ubuntu os as a server. On ubuntu, I had set up a swift environment as per step mention in the https://swift.org/download/#using-downloads.

Now am able to compile swift code on ubuntu with the below command : swift “filename”.swift

But I also want to run test cases related to that program I had achieved that using swift package.

  1. I need to create a swift package using below command:

    swift package init

  2. After creating a package I can run unit test case using below command.

    swift test

Do we have another way/lib to run unit test cases on the ubuntu machine for swift? Suppose I had got 1000 requests for compile and run the swift code and unit test, in this case, I need to create 1000 package to run unit test cases. This approach is not good, can you please suggest another approach to achieve that.




Aucun commentaire:

Enregistrer un commentaire