pdfme / pdfme

A TypeScript based PDF generator library, made with React.
https://pdfme.com
MIT License
2.19k stars 194 forks source link

Performance test handling #390

Closed dkastl closed 5 months ago

dkastl commented 5 months ago

This pull request introduces different error handling of performance related tests for CI and non-CI.

When environment variable CI is set to true (i.e. in GH Actions test workflow), the test fails with an error in case the execution time constraints are violated. In other cases a constraint violation triggers a warning.

The PERFORMANCE_THRESHOLD (in seconds) can be also set as environment variable.

Reference discussion: https://github.com/pdfme/pdfme/discussions/387#discussioncomment-7940652

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **pdfme-playground** | ⬜️ Ignored ([Inspect](https://vercel.com/labelmake/pdfme-playground/6SQwoaiY2CG7hRNKn6y31kTZR8AL)) | [Visit Preview](https://pdfme-playground-git-fork-dkastl-ftr-performan-e2516a-labelmake.vercel.app) | | Dec 25, 2023 4:35am |
hand-dot commented 5 months ago

@dkastl Aren't there any modifications to .github/workflows/test.yml?

dkastl commented 5 months ago

No, it should not be necessary. The CI environment variable should be already set, see https://github.com/pdfme/pdfme/blob/main/.github/workflows/test.yml#L23

hand-dot commented 5 months ago

Thank you @dkastl !!

peteward commented 5 months ago

very nice @dkastl 👏