ci: add prettier workflow and refactor others #686
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In this pr we have huge workflow refactoring, and it's only the start of it. I added a workflow with the name
preview
which will be the base workflow for preview all our changes, for now,preview
has a prettier check and test workflows. In the near futurepreview
will have all kinds of preview (docs, packages) and other tools like statistics and so on.Prettier check can produce 2 variants of exit code for errors:
1
means there are format errors which can be fixed2
means there are format errors which can not be fixedIf we have
1
variant, our bot will write a comment, "Looks like you forgot to run Prettier. Hopefully, you can automatically fix it by typing/prettify
command." After sending, this command will trigger workflow to automatically run prettier and create a commit for it, and the original comment will be deleted by the bot.If we have
2
variant, our workflow will fail and merging to the default branch will be impossible.Closes #503
This depends on #685, after merging and rebase comments with command will work.