Update workflow runs in general to specific order
I just waited for the fuzz tests a long time, just to get a workflow error in not the fuzz tests, but in clippy.
Clippy should definitely come before the fuzz tests.
Maybe this order: Misc -> Clippy -> Standalone -> Parachain -> Fuzz
Clippy compiles the full node too. That's why it takes so long. We could save time when compiling the zeitgeist node once. Is there a way to avoid compiling the same in clippy, standalone etc.. ? If yes, this would lead to getting much earlier results of the workflows and therefore speed up development time.
I investigated time to understand the GitHub Workflow Settings. I found, that this caches the rust crates if they were already compiled. I think about ordering the matrix in a way, that the order works as mentioned above like the following here.
- name: Formatting
run: ./scripts/tests/format.sh
- name: Unit Tests
run: ./scripts/tests/misc.sh
- name: Standalone Checks
run: ./scripts/tests/standalone.sh
- name: Parachain Checks
run: ./scripts/tests/parachain.sh
I don't know if the current matrix runs in parallel. If this is the case, then crates could be loaded multiple times, which is unnecessary, but using a specific order of execution with caching is the best choice. Especially when we can decide in which order they run.
Above it indicates, that there is a Formatting script, which is currently not present. I suggest to move the cargo fmt check from misc.sh to a new script, which runs first in each workflow. It shouldn't take too long, but results in a quick workflow fail for the unformatted code.