mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
71.18k stars 6.41k forks source link

ci(e2e): avoid commenting on PRs in CI, fixing PRs from forks #5365

Closed aloisklink closed 7 months ago

aloisklink commented 7 months ago

:bookmark_tabs: Summary

GitHub Actions can't comment on PRs, if the PR is made from a forked repo, as the github token won't have write permissions. This causes the E2E CI to fail in most PRs, e.g. see https://github.com/mermaid-js/mermaid/pull/5338#issuecomment-1980930325

However, we can instead use GitHub Actions' Adding a Job Summary feature, which prints some custom output for each job. This also means that we can calculate the bundle size for push events, not just PRs. For example, see https://github.com/aloisklink/mermaid/actions/runs/8177226929:

image

The only issue is that

Fix: e0448a7b7be4fcad775f9dd0292f49845c84836c

:straight_ruler: Design Decisions

:clipboard: Tasks

Make sure you

netlify[bot] commented 7 months ago

Deploy Preview for mermaid-js ready!

Name Link
Latest commit 46136b5632a6dfd8d2d6a874c4fe197d8dd05b36
Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/65e8c477caa8dc00087a8abc
Deploy Preview https://deploy-preview-5365--mermaid-js.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 44.67%. Comparing base (821076b) to head (46136b5).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5365/graphs/tree.svg?width=650&height=150&src=pr&token=BaET4V1BdM&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5365?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) ```diff @@ Coverage Diff @@ ## develop #5365 +/- ## ======================================== Coverage 44.67% 44.67% ======================================== Files 25 25 Lines 5339 5339 Branches 27 27 ======================================== Hits 2385 2385 Misses 2953 2953 Partials 1 1 ``` | [Flag](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5365/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | Coverage Ξ” | | |---|---|---| | [unit](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5365/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | `44.67% <ΓΈ> (ΓΈ)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js#carryforward-flags-in-the-pull-request-comment) to find out more.