Skip to content

COMCL-651: Resolve issue while creating direct debit batch #242

COMCL-651: Resolve issue while creating direct debit batch

COMCL-651: Resolve issue while creating direct debit batch #242

Workflow file for this run

name: Tests
on: pull_request
jobs:
run-unit-tests:
runs-on: ubuntu-latest
container: compucorp/civicrm-buildkit:1.3.1-php8.0
env:
CIVICRM_EXTENSIONS_DIR: site/web/sites/all/modules/civicrm/tools/extensions
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Config mysql database as per CiviCRM requirement
run: echo "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" | mysql -u root --password=root --host=mysql
- name: Config amp
run : amp config:set --mysql_dsn=mysql://root:root@mysql:3306
- name: Build Drupal site
run: civibuild create drupal-clean --civi-ver 5.75.0 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site
- uses: compucorp/apply-patch@1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: compucorp/civicrm-core
version: 5.75.0
path: site/web/sites/all/modules/civicrm
- uses: actions/checkout@v2
with:
path: ${{ env.CIVICRM_EXTENSIONS_DIR }}/uk.co.compucorp.manualdirectdebit
- name: Installing Manual Direct Debit and its dependencies
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}
run: |
git clone --depth 1 -b 6.6.0-dev https://github.com/compucorp/uk.co.compucorp.membershipextras.git
cv en uk.co.compucorp.membershipextras uk.co.compucorp.manualdirectdebit
- name: Update civicrm.settings.php
run: |
sed '1a\
$GLOBALS['"'"'_CV'"'"']['"'"'TEST_DB_DSN'"'"'] = '"'"'mysql://root:root@mysql:3306/ukcocompucorpmanualdirectd_text?new_link=true'"'"';\
' $GITHUB_WORKSPACE/site/web/sites/default/civicrm.settings.php | tee $GITHUB_WORKSPACE/site/web/sites/default/civicrm.settings.php > /dev/null
- name: Run phpunit tests
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}/uk.co.compucorp.manualdirectdebit
run: phpunit5