From 209231e5bc206737e2e74e44c458f922ac3bdd4f Mon Sep 17 00:00:00 2001 From: Shubh Doshi Date: Wed, 18 Mar 2026 16:05:55 +0530 Subject: [PATCH 1/2] ci: add workflow_dispatch --- .github/helper/install.sh | 10 ++++++++-- .github/workflows/server-tests.yml | 32 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index bccc61cea7..36360b4c19 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -27,7 +27,10 @@ wkpid=$! pip install frappe-bench -git clone "https://github.com/frappe/frappe" --branch "$BRANCH_TO_CLONE" --depth 1 +FRAPPE_REMOTE=${FRAPPE_REMOTE:-https://github.com/frappe/frappe.git} +FRAPPE_BRANCH=${FRAPPE_BRANCH:-$BRANCH_TO_CLONE} + +git clone "$FRAPPE_REMOTE" --branch "$FRAPPE_BRANCH" --depth 1 bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench mkdir ~/frappe-bench/sites/test_site @@ -53,7 +56,10 @@ sed -i 's/schedule:/# schedule:/g' Procfile 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 +ERPNEXT_REMOTE=${ERPNEXT_REMOTE:-https://github.com/frappe/erpnext.git} +ERPNEXT_BRANCH=${ERPNEXT_BRANCH:-$BRANCH_TO_CLONE} + +bench get-app "$ERPNEXT_REMOTE" --branch "$ERPNEXT_BRANCH" --resolve-deps bench get-app india_compliance "${GITHUB_WORKSPACE}" bench setup requirements --dev diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index ae8c347516..7bf8ffa74a 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -37,10 +37,38 @@ on: - "**.md" - "**.html" - "**.csv" + + workflow_dispatch: + inputs: + frappe_remote: + description: "Frappe remote URL" + required: false + default: "https://github.com/frappe/frappe.git" + type: string + frappe_branch: + description: "Frappe branch" + required: false + default: "develop" + type: string + erpnext_remote: + description: "ERPNext remote URL" + required: false + default: "https://github.com/frappe/erpnext.git" + type: string + erpnext_branch: + description: "ERPNext branch" + required: false + default: "develop" + type: string + env: BRANCH: ${{ inputs.base_ref || github.base_ref || github.ref_name }} APP_NAME: ${{ inputs.app_name || 'india_compliance' }} +concurrency: + group: server-tests-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }} + cancel-in-progress: true + jobs: tests: runs-on: ubuntu-latest @@ -116,6 +144,10 @@ jobs: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh env: BRANCH_TO_CLONE: ${{ env.BRANCH }} + FRAPPE_REMOTE: ${{ inputs.frappe_remote }} + FRAPPE_BRANCH: ${{ inputs.frappe_branch }} + ERPNEXT_REMOTE: ${{ inputs.erpnext_remote }} + ERPNEXT_BRANCH: ${{ inputs.erpnext_branch }} - name: Run Tests run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app ${{ env.APP_NAME }} --with-coverage From 4ad1e39e3338f0a8a97f2a94368742a23609785e Mon Sep 17 00:00:00 2001 From: Shubh Doshi Date: Tue, 7 Apr 2026 19:18:25 +0530 Subject: [PATCH 2/2] fix: isolate concurrency groups and fix frappe clone destination --- .github/helper/install.sh | 2 +- .github/workflows/server-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 36360b4c19..f33357290c 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -30,7 +30,7 @@ pip install frappe-bench FRAPPE_REMOTE=${FRAPPE_REMOTE:-https://github.com/frappe/frappe.git} FRAPPE_BRANCH=${FRAPPE_BRANCH:-$BRANCH_TO_CLONE} -git clone "$FRAPPE_REMOTE" --branch "$FRAPPE_BRANCH" --depth 1 +git clone "$FRAPPE_REMOTE" --branch "$FRAPPE_BRANCH" --depth 1 ~/frappe bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench mkdir ~/frappe-bench/sites/test_site diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index 7bf8ffa74a..1ea489e586 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -66,7 +66,7 @@ env: APP_NAME: ${{ inputs.app_name || 'india_compliance' }} concurrency: - group: server-tests-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }} + group: server-tests-${{ github.event_name }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || github.event.number || github.ref || github.run_id }} cancel-in-progress: true jobs: