digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
Other
802 stars 204 forks source link

Split up create-daml-app integration tests #11217

Open cocreature opened 3 years ago

cocreature commented 3 years ago

Those tests are currently way too slow and also flaky. I do think they have value but we can probably split them up a fair bit. I would suggest the following:

  1. Keep one test which runs through the getting started guide workflow. Specifically:
    1. daml start
    2. npm install (already with added puppeteer deps)
    3. npm start
    4. Run through pupeteer steps
    5. Modify the files
    6. Run through pupeteer steps
    7. Move everything else, in particular the yarn build steps into tests that only depend on the codegen & yarn. Could even use a genrule for the codegen and then a da_ts_library ideally.

This should roughly cut the test time of 1 in half and 2 should get much much better caching and also doesn’t have to be exclusive.

S11001001 commented 2 years ago

Out of

//daml-assistant/integration-tests:create-daml-app-tests-proj-name       PASSED in 192.2s
//daml-assistant/integration-tests:integration-tests                     PASSED in 207.7s

the former (CreateDamlAppTests.hs) contains only one test, and the latter (IntegrationTests.hs) contains several. So I think there are two subtasks here: