Skip to main content

ci: run a `git checkout` before running post-receive tests

ID
bfb3fbb
date
2026-09-21 06:06:08+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
7b0f798
message
ci: run a `git checkout` before running post-receive tests
changed files
1 file, 3 additions, 2 deletions

Changed files

ci/post_receive_tests.sh (1769 → 1796)

diff --git a/ci/post_receive_tests.sh b/ci/post_receive_tests.sh
index d0cdd9b..d9b05b3 100755
--- a/ci/post_receive_tests.sh
+++ b/ci/post_receive_tests.sh
@@ -42,7 +42,7 @@ export CI=true
 # it if it doesn't.
 if [ ! -d "$SCRATCH_DIR/.git" ]; then
   run_command 'git clone "$REPO_DIR" "$SCRATCH_DIR"'
-  
+
   run_command 'cd "$SCRATCH_DIR"'
   echo "$SCRATCH_DIR"
   cd "$SCRATCH_DIR"
@@ -51,6 +51,7 @@ else
   echo "$SCRATCH_DIR"
   cd "$SCRATCH_DIR"
 
+  run_command 'git checkout .'
   run_command 'git pull origin main --rebase'
 fi
 
@@ -60,7 +61,7 @@ if [ -f "$SCRATCH_DIR/requirements.txt" ] || [ -f "$SCRATCH_DIR/dev_requirements
   run_command 'uv venv --quiet --allow-existing .venv --python 3.14'
   echo "$SCRATCH_DIR/.venv" >> ~/.venv_registry
   run_command 'source .venv/bin/activate'
-  source .venv/bin/activate  
+  source .venv/bin/activate
   run_pip_sync
 fi