You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that all PRs pass `cargo check` and `cargo doc` builds
before they are gated into the full build matrix.
In addition, we add GHA annotations to improve error messages.
'::error title={Failed git diff --check}::Your pull request introduces whitespace errors, which is not allowed. Please run:%0A%0A'\
34
+
' git rebase --whitespace=fix%0A'\
35
+
' git push -f%0A%0Ato correct and resubmit.'
39
36
exit 1;
40
37
}
41
38
42
39
- name: Checking for cargo-fmt errors (PRs only)
43
40
if: github.event.pull_request.base.sha
44
41
run: |
45
42
cargo fmt --check || { \
46
-
echo >&2 "Your pull request does not conform to cargo-fmt";
47
-
echo >&2 "Rust format, which is not allowed. Please run:";
48
-
echo >&2;
49
-
echo >&2 " cargo fmt";
50
-
echo >&2 " git commit -a --amend";
51
-
echo >&2 " git push -f";
52
-
echo >&2;
53
-
echo >&2 "to correct and resubmit. If \`cargo fmt\` touches";
54
-
echo >&2 "code which is not part of your MR, please let us";
55
-
echo >&2 "know in the comments.";
43
+
echo \
44
+
'::error title={Failed cargo-fmt --check}::Your pull request does not conform to cargo-fmt, which is not allowed. Please run:%0A%0A' \
45
+
' cargo fmt%0A' \
46
+
' git commit -a --amend%0A' \
47
+
' git push -f%0A%0Ato correct and resubmit. If the `cargo fmt` touches code which is not part of your original PR, please let us know in the comments.'
'::error title={Failed cargo-check}::`cargo check` must pass without errors. Please correct Rust compiler lints. When you are finished, please run:%0A%0A' \
89
+
' cargo fmt%0A' \
90
+
' git commit -a --amend%0A' \
91
+
' git push -f%0A%0Ato correct and resubmit. If this requires you to touch code which is not part of your original PR, please let us know in the comments.'
'::error title={Failed cargo-doc build}::Documentation failed to build. `cargo doc` must be able to generate crate documentation without errors. Please fix. When you are finished, please run:%0A%0A' \
101
+
' cargo fmt%0A' \
102
+
' git commit -a --amend%0A' \
103
+
' git push -f%0A%0Ato correct and resubmit. If this requires you to touch code which is not part of your original PR, please let us know in the comments.'
104
+
exit 1;
105
+
}
106
+
91
107
# test sameold with all crate feature combinations,
0 commit comments