Skip to content

Replace smarty fetch() call with CRM_Utils_String::parseOneOffStringThroughSmarty() #18

Replace smarty fetch() call with CRM_Utils_String::parseOneOffStringThroughSmarty()

Replace smarty fetch() call with CRM_Utils_String::parseOneOffStringThroughSmarty() #18

Workflow file for this run

name: PHPUnit
on:
pull_request:
paths:
- '**.php'
- composer.json
- tools/phpunit/composer.json
- phpunit.xml.dist
env:
# On github CI machine creating the "/vendor" volume fails otherwise with: read-only file system: unknown
BIND_VOLUME_PERMISSIONS: rw
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
# The info.xml says CiviCRM 5.38 is supported. Though running phpunit in
# that container fails with:
# The file "tests/phpunit/api/v4/services.xml" does not exist (in: "/var/www/html/sites/all/modules/civicrm").
# Thus, the least version here is 5.39.
# In addition the method CRM_Utils_String::parseOneOffStringThroughSmarty is being used
# Thus, the least version is now 5.75
civicrm-image-tags: [ '5-drupal', '5.75-drupal-php8.0' ]
name: PHPUnit with Docker image michaelmcandrew/civicrm:${{ matrix.civicrm-image-tags }}
env:
CIVICRM_IMAGE_TAG: ${{ matrix.civicrm-image-tags }}
steps:
- uses: actions/checkout@v3
- name: Pull images
run: docker compose -f tests/docker-compose.yml pull --quiet
- name: Start containers
run: docker compose -f tests/docker-compose.yml up -d
- name: Prepare environment
run: docker compose -f tests/docker-compose.yml exec civicrm sites/default/files/civicrm/ext/de.systopia.moregreetings/tests/docker-prepare.sh
- name: Run PHPUnit
run: docker compose -f tests/docker-compose.yml exec civicrm sites/default/files/civicrm/ext/de.systopia.moregreetings/tests/docker-phpunit.sh
- name: Remove containers
run: docker compose -f tests/docker-compose.yml down -v