Skip to content

Commit

Permalink
fix: added local db
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Aug 22, 2024
1 parent 77c7ecb commit cad70be
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile

bench get-app erpnext --branch "$BRANCH_TO_CLONE" --resolve-deps
bench --site test_site restore 20240822_151612-patch_test_localhost-database.sql.gz

bench remove-app india_compliance --force

bench get-app india_compliance "${GITHUB_WORKSPACE}"
bench setup requirements --dev

Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Patch

on:
# pull_request:
# paths-ignore:
# - '**.js'
# - '**.css'
# - '**.md'
# - '**.html'
# - '**.csv'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -94,8 +101,9 @@ jobs:
jq 'del(.install_apps)' ~/frappe-bench/sites/test_site/site_config.json > tmp.json
mv tmp.json ~/frappe-bench/sites/test_site/site_config.json
wget https://erpnext.com/files/v13-erpnext.sql.gz
bench --site test_site restore ~/frappe-bench/v13-erpnext.sql.gz
# wget https://erpnext.com/files/v13-erpnext.sql.gz
# wget 20240822_151612-patch_test_localhost-database.sql.gz
# bench --site test_site restore ~/frappe-bench/apps/india_compliance/20240822_151612-patch_test_localhost-database.sql.gz
git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git
git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git
Expand Down Expand Up @@ -148,7 +156,7 @@ jobs:
}
# update_to_version 14
update_to_version 15
# update_to_version 15
echo "Updating to latest version"
git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}"
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/server-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ on:
secrets:
codecov_token:

pull_request:
paths-ignore:
- "**.css"
- "**.js"
- "**.md"
- "**.html"
- "**.csv"


push:
branches: [develop, version-14-hotfix, version-14, version-15-hotfix, version-15]
paths-ignore:
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions india_compliance/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def after_install():


def run_post_install_patches():
# if not frappe.db.exists("Company", {"country": "India"}):
# return
if not frappe.db.exists("Company", {"country": "India"}):
return

frappe.flags.in_patch = True

Expand Down

0 comments on commit cad70be

Please sign in to comment.