aboutsummaryrefslogtreecommitdiff
path: root/ci.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci.sh')
-rw-r--r--ci.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/ci.sh b/ci.sh
new file mode 100644
index 0000000..df0131e
--- /dev/null
+++ b/ci.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# A script to run a simplified version of the checks done by CI.
+#
+# Usage
+#
+# ```sh
+# . ./ci.sh
+# ```
+
+echo "Running 'cargo fmt -- --check'"
+cargo +nightly fmt --all -- --check
+
+echo "Running 'cargo clippy'"
+cargo +nightly clippy --all --all-features --all-targets
+
+echo "Running 'cargo test'"
+cargo +nightly test --all --all-features
+
+echo "Running 'cargo doc'"
+cargo +nightly doc --no-deps --all --all-features
+
+echo "Running 'compiletest'"
+. ./compiletest.sh
+
+echo "Running 'expandtest'"
+# See also https://docs.rs/macrotest/1/macrotest/#updating-expandedrs
+# rm **/*.expanded.rs
+cargo +nightly test --manifest-path tests/expand/Cargo.toml