summaryrefslogtreecommitdiffstats
path: root/mobile/android/fenix/config/pre-push-recommended.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /mobile/android/fenix/config/pre-push-recommended.sh
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/fenix/config/pre-push-recommended.sh')
-rwxr-xr-xmobile/android/fenix/config/pre-push-recommended.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/mobile/android/fenix/config/pre-push-recommended.sh b/mobile/android/fenix/config/pre-push-recommended.sh
new file mode 100755
index 0000000000..fa78dc28d0
--- /dev/null
+++ b/mobile/android/fenix/config/pre-push-recommended.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# We recommend you run this as a pre-push hook: to reduce
+# review turn-around time, we want all pushes to run tasks
+# locally. Using this hook will guarantee your hook gets
+# updated as the repository changes.
+#
+# This hook tries to run as much as possible without taking
+# too long.
+#
+# You can use it by running this command from the project root:
+# `ln -s ../../config/pre-push-recommended.sh .git/hooks/pre-push`
+
+set -e
+
+# Run linter in tools/ if it's installed.
+if `which pycodestyle > /dev/null`; then
+ pycodestyle tools
+fi
+
+# Run core checks. Descriptions for each gradle task
+# below can be found in the output of `./gradlew tasks`.
+#
+# Tasks omitted because they take a long time to run:
+# - assembling all variants
+# - unit test on all variants
+# - UI tests
+# - android lint (takes a long time to run)
+./gradlew -q \
+ ktlint \
+ detekt \
+ assembleDebug \
+ assembleDebugAndroidTest \
+ mozilla-detekt-rules:test \
+ mozilla-lint-rules:test \
+ testDebug