tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
354 stars 96 forks source link

Improve performance of tests #146

Open anton-trunov opened 6 months ago

anton-trunov commented 6 months ago

Currently some tests take a bit too long to run. Here is a sample run on my dev laptop:

...
$ jest
PASS  src/test/feature-map.spec.ts (34.231 s)
PASS  src/test/feature-dns.spec.ts (28.953 s)
PASS  src/test/feature-masterchain.spec.ts (12.031 s)

Test Suites: 37 passed, 37 total
Tests:       253 passed, 253 total
Snapshots:   166 passed, 166 total
Time:        105.891 s, estimated 110 s
Ran all test suites.
✨  Done in 106.89s.
novusnota commented 5 months ago
  1. We can swap out the default Jest runner ts-jest with Rust one: https://swc.rs/docs/usage/jest
  2. Make use of --shard and --maxWorkers options in GitHub Actions and in CLI setting. See this Reddit page & article.

If the above won't add much, we could migrate from Jest to Vitest, which has a compatible API, but is much lighter by design.