ci: remove obsolete helpers & fix coverage config setup (#28603)
* ci: remove obsolete helpers * ci: fix coverage
This commit is contained in:
parent
762a8130e2
commit
0aa089b9f0
6 changed files with 1 additions and 113 deletions
2
.github/actions/setup/action.yml
vendored
2
.github/actions/setup/action.yml
vendored
|
|
@ -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)
|
||||
|
|
|
|||
35
.github/helper/install_bench.sh
vendored
35
.github/helper/install_bench.sh
vendored
|
|
@ -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"
|
||||
16
.github/helper/install_dependencies.sh
vendored
16
.github/helper/install_dependencies.sh
vendored
|
|
@ -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::"
|
||||
59
.github/helper/install_site.sh
vendored
59
.github/helper/install_site.sh
vendored
|
|
@ -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::"
|
||||
1
.github/workflows/_base-server-tests.yml
vendored
1
.github/workflows/_base-server-tests.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
1
.github/workflows/_base-ui-tests.yml
vendored
1
.github/workflows/_base-ui-tests.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue