tbo47 / dagre-es

The dagrejs library exported as ES modules.
Other
32 stars 14 forks source link

Add a basic GitHub actions for checking `prettier` formatting #10

Closed aloisklink closed 1 year ago

aloisklink commented 1 year ago

Adds a basic GitHub Action workflow that just runs prettier --check . and fails if any files haven't been formatted with prettier.

GitHub Actions is a continuous integration provider from GitHub that is free for public repositories:

GitHub Actions usage is free for standard GitHub-hosted runners in public repositories

Taken from https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#about-billing-for-github-actions

On GitHub, you will get a little green tick by your commit if all CI passed, or a red cross if anything failed:

image

Viewing the CI output will show the step that failed (e.g. if the command returned a non-zero exit code), and the output of that step:

image

This should make reviewing pull requests from other people easier, since GitHub should do some of the work for you!

In the future, it might be useful to copy over some of the automated tests from the https://github.com/dagrejs/graphlib library, and use them too, but that can be future work!


Btw, I had to add a custom prettier config to get the same output as was created in https://github.com/tbo47/dagre-es/commit/c888afa7653ce828ca9bb3f1b1bce8d10f02cd3f.

I just guessed some values that don't change anything, but if there are different values you want to use, feel free to modify them!