diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 5643246625..c249d45aea 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -194,7 +194,7 @@ runs: skip_watch=is_not_true("${{ inputs.enable-watch }}"), skip_socketio=is_true("${{ inputs.disable-socketio }}"), skip_schedule=is_not_true("${{ inputs.enable-schedule }}"), - with_coverage=is_not_true("${{ inputs.enable-coverage }}"), + with_coverage=is_true("${{ inputs.enable-coverage }}"), ) EOF end_time=$(date +%s) diff --git a/.github/helper/install_bench.sh b/.github/helper/install_bench.sh deleted file mode 100644 index c6dcff2091..0000000000 --- a/.github/helper/install_bench.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -set -e -cd ~ || exit - -verbosity="${BENCH_VERBOSITY_FLAG:-}" - -start_time=$(date +%s) -echo "::group::Install Bench" -pip install frappe-bench -echo "::endgroup::" -end_time=$(date +%s) -echo "Time taken to Install Bench: $((end_time - start_time)) seconds" - -git config --global init.defaultBranch main -git config --global advice.detachedHead false - -start_time=$(date +%s) -echo "::group::Init Bench & Install Frappe" -bench $verbosity init frappe-bench --skip-assets --python "$(which python)" --frappe-path "${GITHUB_WORKSPACE}" -echo "::endgroup::" -end_time=$(date +%s) -echo "Time taken to Init Bench & Install Frappe: $((end_time - start_time)) seconds" - -cd ~/frappe-bench || exit - -start_time=$(date +%s) -echo "::group::Install App Requirements" -bench $verbosity setup requirements --dev -if [ "$TYPE" == "ui" ] -then - bench $verbosity setup requirements --node; -fi -end_time=$(date +%s) -echo "::endgroup::" -echo "Time taken to Install App Requirements: $((end_time - start_time)) seconds" \ No newline at end of file diff --git a/.github/helper/install_dependencies.sh b/.github/helper/install_dependencies.sh deleted file mode 100644 index f382b61dda..0000000000 --- a/.github/helper/install_dependencies.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e - -echo "Setting Up System Dependencies..." - -echo "::group::apt packages" -sudo apt update -sudo apt remove mysql-server mysql-client -sudo apt install libcups2-dev redis-server mariadb-client-10.6 - -install_wkhtmltopdf() { - wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb - sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb -} -install_wkhtmltopdf & -echo "::endgroup::" diff --git a/.github/helper/install_site.sh b/.github/helper/install_site.sh deleted file mode 100644 index c87b905ae4..0000000000 --- a/.github/helper/install_site.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -set -e -cd ~/frappe-bench || exit - -echo "::group::Create Test Site" -mkdir ~/frappe-bench/sites/test_site -cp "${GITHUB_WORKSPACE}/.github/helper/db/$DB.json" ~/frappe-bench/sites/test_site/site_config.json - -if [ "$DB" == "mariadb" ] -then - mariadb --host 127.0.0.1 --port 3306 -u root -pdb_root -e "SET GLOBAL character_set_server = 'utf8mb4'"; - mariadb --host 127.0.0.1 --port 3306 -u root -pdb_root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"; - - mariadb --host 127.0.0.1 --port 3306 -u root -pdb_root -e "CREATE DATABASE test_frappe"; - mariadb --host 127.0.0.1 --port 3306 -u root -pdb_root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"; - mariadb --host 127.0.0.1 --port 3306 -u root -pdb_root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"; - - mariadb --host 127.0.0.1 --port 3306 -u root -pdb_root -e "FLUSH PRIVILEGES"; -fi -if [ "$DB" == "postgres" ] -then - echo "db_root" | psql -h 127.0.0.1 -p 5432 -c "CREATE DATABASE test_frappe" -U postgres; - echo "db_root" | psql -h 127.0.0.1 -p 5432 -c "CREATE USER test_frappe WITH PASSWORD 'test_frappe'" -U postgres; -fi -echo "::endgroup::" - -echo "::group::Modify processes" -sed -i 's/^watch:/# watch:/g' Procfile -sed -i 's/^schedule:/# schedule:/g' Procfile - -if [ "$TYPE" == "server" ] -then - sed -i 's/^socketio:/# socketio:/g' Procfile - sed -i 's/^redis_socketio:/# redis_socketio:/g' Procfile -fi - -if [ "$TYPE" == "ui" ] -then - sed -i 's/^web: bench serve/web: bench serve --with-coverage/g' Procfile -fi -echo "::endgroup::" - -bench start &> ~/frappe-bench/bench_start.log & - -echo "::group::Install site" -if [ "$TYPE" == "server" ] -then - CI=Yes bench build --app frappe & - build_pid=$! -fi - -bench --site test_site reinstall --yes - -if [ "$TYPE" == "server" ] -then - # wait till assets are built successfully - wait $build_pid -fi -echo "::endgroup::" diff --git a/.github/workflows/_base-server-tests.yml b/.github/workflows/_base-server-tests.yml index 979dc90fe9..3142e3ef91 100644 --- a/.github/workflows/_base-server-tests.yml +++ b/.github/workflows/_base-server-tests.yml @@ -59,7 +59,6 @@ jobs: # noisy 3rd party library warnings PYTHONWARNINGS: "module,ignore:::babel.messages.extract" DB_ROOT_PASSWORD: db_root - COVERAGE_RCFILE: ./apps/frappe/.coveragerc strategy: fail-fast: false diff --git a/.github/workflows/_base-ui-tests.yml b/.github/workflows/_base-ui-tests.yml index 80d9f2a806..3ba8abe006 100644 --- a/.github/workflows/_base-ui-tests.yml +++ b/.github/workflows/_base-ui-tests.yml @@ -48,7 +48,6 @@ jobs: # noisy 3rd party library warnings PYTHONWARNINGS: "ignore" DB_ROOT_PASSWORD: db_root - COVERAGE_RCFILE: ./apps/frappe/.coveragerc strategy: fail-fast: false