-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore!: checks tool #1385
Closed
Closed
chore!: checks tool #1385
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cript.rs Co-authored-by: hal3e <git@hal3e.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Breaking
The feature of
fuels
calledfuels-test-helpers
is now calledtest-helpers
.Description
A single place to write all our code checks in the future. All CI checks are now calls to the
checks
binary. That means if it passes locally 99% your CI is going to pass.There are three flavors of tests currently:
normal
gets you exactly what the CI is going to run. Basically tests, fmt, typos, clippy, check, doc tests, doc links, md anchors, etc, for all packages. Also wasm tests and e2e tests with various combinations of using the binary vs library, type paths vs no type paths.hack-features
will try out every feature combination on each of our workspace members separately while denying warnings. This catches invalid feature combinations and dead code.hack-deps
usesudeps
and the nightly compiler to detect dependencies that should be feature-gated.Planned flavors:
Running:
Tasks are described in rust over in
tasks/builder.rs
. Choosing a flavor uses the builder to define what is run for each flavor.The smallest unit of work is a
Task
. All tasks are run in parallel (might need to be controlled if you end up having issues due to slower hardware):cwd
is the folder from which the task is to be runcmd
is defined as:Either a built in check
MdCheck
(this is the unused/missing anchors check) or a custom command. Any future custom logic will extendCommand
.Deps
is defined as:It details what is expected of the environment the tasks are to be run it. This is needed for setting up the CI.
You can list all the tasks available under a flavor by doing:
You can use the CLI further choose tasks by their ID or their cwd.
The output is also written in a way that you can just copy-paste the command to run it in the terminal:
is going to run just fine and produce the same result.
Jobs for the CI are generated by doing:
cargo run --bin checks -- --root . --dump-ci-config
You'll get a json array for each CI job that is to be run. Example:
This details the ids of the tasks that are to be run as a single job in the CI. Rust should be setup with clippy and fmt, nextest needs to be available and the
typos
tool. The display name of this job isscripts/fuels-tests-helpers
which will show up in the CI GUI.The CI jobs are formed by grouping all generated tasks by the directory in which they are to be run. This is done so that we reuse the compiled artifacts rather than redo the work in multiple different jobs.
Whatever grouping of tasks we define,
checks
will unify all their dependencies and list them in thedeps
part of the CI job config so that the CI can install them.Checklist