From 5a69e3927b4970da9a0bfd82080bcd65f2e00197 Mon Sep 17 00:00:00 2001 From: ARIA Date: Sat, 22 Aug 2026 03:42:15 +0200 Subject: [PATCH] Fix CI: uv sync --extra dev; sdkmanager licenses without SIGPIPE - pytest lives in hermes-agent's dev extra; plain uv sync left the CI venv without it and run_tests.sh refused to run (gateway job) - 'yes | sdkmanager --licenses' dies with SIGPIPE (exit 141) under Gitea's bash -e -o pipefail; feed a finite number of y's from a file instead (kotlin + android jobs) --- .gitea/workflows/ci.yml | 12 +++++++++--- .gitea/workflows/release.yml | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1db29ca..c881229 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -29,7 +29,9 @@ jobs: run: | echo "$HOME/.local/bin" >> "$GITHUB_PATH" cd hermes-agent - uv sync + # pytest lives in the `dev` extra — a plain `uv sync` leaves the + # venv without it and run_tests.sh refuses to run. + uv sync --extra dev - name: Run android gateway tests run: | @@ -62,7 +64,11 @@ jobs: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip unzip -q /tmp/ct.zip -d "$ANDROID_HOME/cmdline-tools" mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest" - yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null + # Finite input from a file: `yes | sdkmanager` dies with SIGPIPE + # (exit 141) under Gitea's `bash -e -o pipefail` once sdkmanager + # exits before `yes` is done writing. + for i in $(seq 100); do echo y; done > /tmp/sdk_licenses_yes.txt + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses < /tmp/sdk_licenses_yes.txt > /dev/null echo "ANDROID_HOME=$ANDROID_HOME" >> "$GITHUB_ENV" echo "sdk.dir=$ANDROID_HOME" > app/local.properties @@ -70,4 +76,4 @@ jobs: # missing SDK platforms (licenses accepted above). - name: Run host tests working-directory: app - run: ./gradlew :shared:testAndroidHostTest :shared:desktopTest \ No newline at end of file + run: ./gradlew :shared:testAndroidHostTest :shared:desktopTest diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cb3f8e1..21de9b2 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -32,7 +32,9 @@ jobs: run: | echo "$HOME/.local/bin" >> "$GITHUB_PATH" cd hermes-agent - uv sync + # pytest lives in the `dev` extra — a plain `uv sync` leaves the + # venv without it and run_tests.sh refuses to run. + uv sync --extra dev - name: Run android gateway tests run: | @@ -63,7 +65,11 @@ jobs: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip unzip -q /tmp/ct.zip -d "$ANDROID_HOME/cmdline-tools" mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest" - yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null + # Finite input from a file: `yes | sdkmanager` dies with SIGPIPE + # (exit 141) under Gitea's `bash -e -o pipefail` once sdkmanager + # exits before `yes` is done writing. + for i in $(seq 100); do echo y; done > /tmp/sdk_licenses_yes.txt + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses < /tmp/sdk_licenses_yes.txt > /dev/null echo "ANDROID_HOME=$ANDROID_HOME" >> "$GITHUB_ENV" echo "sdk.dir=$ANDROID_HOME" > app/local.properties @@ -94,7 +100,11 @@ jobs: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip unzip -q /tmp/ct.zip -d "$ANDROID_HOME/cmdline-tools" mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest" - yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null + # Finite input from a file: `yes | sdkmanager` dies with SIGPIPE + # (exit 141) under Gitea's `bash -e -o pipefail` once sdkmanager + # exits before `yes` is done writing. + for i in $(seq 100); do echo y; done > /tmp/sdk_licenses_yes.txt + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses < /tmp/sdk_licenses_yes.txt > /dev/null echo "ANDROID_HOME=$ANDROID_HOME" >> "$GITHUB_ENV" echo "sdk.dir=$ANDROID_HOME" > app/local.properties