Skip to content

Commit

Permalink
COMCL-744: Use correct branches in test gihub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Sep 2, 2024
1 parent ec5a105 commit dbdd9e4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
run : composer self-update 2.2.5

- name: Build Drupal site
run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.94 --web-root $GITHUB_WORKSPACE/site
run: civibuild create drupal-clean --civi-ver 5.75.0 --cms-ver 7.94 --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.51.3
version: 5.75
path: site/web/sites/all/modules/civicrm

- uses: actions/checkout@v2
Expand All @@ -49,6 +49,25 @@ jobs:
- name: Installing Finance Extras
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}
run: cv en financeextras


- name: Setup Test DB
run: echo "CREATE DATABASE civicrm_test;" | mysql -u root --password=root --host=mysql

- name: Update civicrm.settings.php
run: |
FILE_PATH="$GITHUB_WORKSPACE/site/web/sites/default/civicrm.settings.php"
INSERT_LINE="\$GLOBALS['_CV']['TEST_DB_DSN'] = 'mysql://root:root@mysql:3306/civicrm_test?new_link=true';"
TMP_FILE=$(mktemp)
while IFS= read -r line
do
echo "$line" >> "$TMP_FILE"
if [ "$line" = "<?php" ]; then
echo "$INSERT_LINE" >> "$TMP_FILE"
fi
done < "$FILE_PATH"
mv "$TMP_FILE" "$FILE_PATH"
echo "File modified successfully."
- name: Run phpunit tests
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}/io.compuco.financeextras
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Civi\Financeextras\Event;

use \Civi\Core\Event\GenericHookEvent as Event;
use Civi\Core\Event\GenericHookEvent as Event;

/**
* The fe.contribution.received_payment event will be dispatched
Expand Down
2 changes: 1 addition & 1 deletion Civi/Financeextras/Event/CreditNoteDownloadedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Civi\Financeextras\Event;

use \Civi\Core\Event\GenericHookEvent as Event;
use Civi\Core\Event\GenericHookEvent as Event;

/**
* The fe.creditnote.downloaded event is dispatched
Expand Down
2 changes: 1 addition & 1 deletion Civi/Financeextras/Event/CreditNoteMailedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Civi\Financeextras\Event;

use \Civi\Core\Event\GenericHookEvent as Event;
use Civi\Core\Event\GenericHookEvent as Event;

/**
* The fe.creditnote.mailed event is dispatched
Expand Down

0 comments on commit dbdd9e4

Please sign in to comment.