Skip to content

Commit

Permalink
check for windows unit test (no-check)
Browse files Browse the repository at this point in the history
  • Loading branch information
msberends committed Jun 23, 2024
1 parent 8258590 commit 4f9db23
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 66 deletions.
57 changes: 0 additions & 57 deletions .github/prehooks/commit-msg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,25 @@
# This script runs before every commit #
########################################

# try to fetch the commit message from the standard location
COMMIT_MSG_PATH=".git/COMMIT_EDITMSG"
if [ -f "$COMMIT_MSG_PATH" ]; then
COMMIT_MSG=$(cat "$COMMIT_MSG_PATH")
COMMIT_MSG_FILE=".git/COMMIT_EDITMSG"

# Read the commit message
if [ -f "$COMMIT_MSG_FILE" ]; then
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
else
echo "Commit message file not found."
exit 1
fi
# check the commit message, cancel commit if needed
if [[ "$COMMIT_MSG" =~ \(no-check\)|\(no-checks\)|\(no-verify\) ]]; then
echo "Not running pre-commit checks:"
echo "Commit message contains '(no-check)', '(no-checks)', or '(no-verify)."

# Check the commit message and skip checks if needed
if [[ "$COMMIT_MSG" =~ no-?checks?|no-?verify ]]; then
echo "Not running prehook:"
echo "Commit message contains 'no-check' or 'no-verify'."
echo ""
exit 0
fi

echo "Running pre-commit checks..."
echo "Running prehook..."

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if command -v Rscript > /dev/null; then
Expand Down Expand Up @@ -119,3 +121,6 @@ else
echo "- no NEWS.md found!"
fi
echo ""

# Prepend the version number to the commit message
echo "(v${currentversion}) ${COMMIT_MSG}" > "$COMMIT_MSG_FILE"
1 change: 1 addition & 0 deletions inst/tinytest/test-sir.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ expect_identical(out_vet$PRA, rep(NA_sir_, 11))
expect_identical(out_vet$FLR, as.sir(c("S", "S", NA, "S", "S", NA, "I", "R", NA, "R", "R")))

sir_history <- sir_interpretation_history()
print(sir_history$host)
expect_identical(sir_history$host,
c("poultry", "cattle", "poultry", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "dogs", "horse", "dogs", "horse", "horse", "horse", "cattle", "horse", "cattle", "cattle", "cattle",
"cattle", "cattle", "cattle", "cattle", "dogs", "dogs", "dogs", "dogs", "dogs", "dogs", "cattle", "dogs", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cattle", "cats", "cats",
Expand Down

0 comments on commit 4f9db23

Please sign in to comment.