From 6f2c9c692cb656bbb8e467636cccdc2a7f54b9aa Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 3 Feb 2022 17:30:42 +0530 Subject: [PATCH] ci: workflow dispatch options (#29611) --- .github/helper/install.sh | 5 ++++- .github/workflows/server-tests-mariadb.yml | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 903196847d..eab6d50e79 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -8,7 +8,10 @@ sudo apt-get install redis-server libcups2-dev pip install frappe-bench -git clone https://github.com/frappe/frappe --branch "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" --depth 1 +frappeuser=${FRAPPE_USER:-"frappe"} +frappebranch=${FRAPPE_BRANCH:-${GITHUB_BASE_REF:-${GITHUB_REF##*/}}} + +git clone "https://github.com/${frappeuser}/frappe" --branch "${frappebranch}" --depth 1 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-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 7347a5856a..40f93651f4 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -6,12 +6,23 @@ on: - '**.js' - '**.md' - '**.html' - workflow_dispatch: push: branches: [ develop ] paths-ignore: - '**.js' - '**.md' + workflow_dispatch: + inputs: + user: + description: 'user' + required: true + default: 'frappe' + type: string + branch: + description: 'Branch name' + default: 'develop' + required: false + type: string concurrency: group: server-mariadb-develop-${{ github.event.number }} @@ -95,6 +106,8 @@ jobs: env: DB: mariadb TYPE: server + FRAPPE_USER: ${{ github.event.inputs.user }} + FRAPPE_BRANCH: ${{ github.event.inputs.branch }} - name: Run Tests run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --use-orchestrator --with-coverage