From a4cb0313ddc2178ecde458ebe62b6ad27b3e5ec1 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Mon, 9 Jan 2023 09:57:34 +0100 Subject: [PATCH] chore: test with wkhtmltopdf 12.6 (#33554) * chore: test with latest wkhtmltopdf * chore: check ubuntu version * ci: check exit code of wk install Co-authored-by: Ankush Menat --- .github/helper/install.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 2b3d8cb9b3..0c71b41a7c 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -41,12 +41,17 @@ fi install_whktml() { - wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz - tar -xf /tmp/wkhtmltox.tar.xz -C /tmp - sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf - sudo chmod o+x /usr/local/bin/wkhtmltopdf + if [ "$(lsb_release -rs)" = "22.04" ]; then + wget -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb + sudo apt install /tmp/wkhtmltox.deb + else + echo "Please update this script to support wkhtmltopdf for $(lsb_release -ds)" + exit 1 + fi } install_whktml & +wkpid=$! + cd ~/frappe-bench || exit @@ -60,6 +65,8 @@ bench get-app erpnext "${GITHUB_WORKSPACE}" if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi +wait $wkpid + bench start &> bench_run_logs.txt & CI=Yes bench build --app frappe & bench --site test_site reinstall --yes