interlay / interbtc-api

interBTC TypeScript SDK
https://app.interlay.io/
Apache License 2.0
26 stars 20 forks source link

Tracking issue: Optimize lib to reduce CI pipeline to less than 10 minutes #568

Closed nud3l closed 1 year ago

nud3l commented 1 year ago

Is your feature request related to a problem? Please describe. The lib integration tests run for 45 min on the kintsugi version (https://github.com/interlay/interbtc-api/actions/workflows/integration-tests-kint.yml) and for more than 90 minutes on the interlay version (https://github.com/interlay/interbtc-api/actions/workflows/integration-tests-intr.yml).

Some tests are written in a way that there are cross-dependencies such that failure in one test might lead to a failure in a dependent test further down the pipeline.

Also, some tests replicate testing edge cases on the parachain/clients that are unrelated to the lib code. These tests do not provide extra assurance about the code but rather duplicate testing efforts that are on the parachain/clients (or should be moved there if they don't already exist).

This leads to two main issues:

  1. For regular PRs, there's a significant wait time for the pipeline. This has negative impact on the developer experience and limits the number of times we can run the pipeline in a given day - thus reducing code velocity.
  2. For emergency fixes, the pipeline often needs to be skipped as critical bug testing must happen outside the 45 min plus pipeline for fix deployment. This circumvents the point of having integration tests.

Describe the solution you'd like

The overall goal is to reduce the lib pipeline to under 10 minutes. Ideally the pipeline should be even faster than that but that seems like an acceptable first goal.

To achieve this, we need to tackle a couple of things. This is an open-ended list and can be extended.

nud3l commented 1 year ago

@gregdhill @peterslany @bvotteler should we close this issue? Not sure we did all of the above, but pipeline is now below 10 minutes so I'd be inclined to close this issue.