1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- name: PHPUnit
- on: [push, pull_request]
- jobs:
- run-tests:
-
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- php-versions: ['7.1', '7.2']
-
- name: PHPUnit Testing (PHP ${{ matrix.php-versions }})
-
- services:
-
- postgres:
-
- image: postgres
- env:
- POSTGRES_USER: tripaladmin
- POSTGRES_PASSWORD: somesupersecurepassword
- POSTGRES_DB: testdb
-
- options: >-
- --health-cmd pg_isready
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- ports:
-
- - 5432:5432
- steps:
-
- - uses: actions/checkout@v2
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php-versions }}
- extensions: mbstring, intl, php-pgsql, php-gd, php-xml
- ini-values: memory_limit=2G
- coverage: xdebug
- tools: composer, phpunit
-
-
- - name: Setup Drush, Drupal 7.x, Tripal 3.x
- id: tripalsetup
- uses: tripal/setup-tripal-action@7.x-3.x-1.0
- with:
- postgres_user: tripaladmin
- postgres_pass: somesupersecurepassword
- postgres_db: testdb
-
-
- - name: Install Tripal Extension Module
- id: installextension
- env:
- DRUSH: ${{ steps.tripalsetup.outputs.drush_path }}
- DRUPAL_ROOT: ${{ steps.tripalsetup.outputs.drupal_root }}
- run: |
- cp -R * $DRUPAL_ROOT/sites/all/modules/tripal_jbrowse
- $DRUSH en -y tripal_jbrowse_mgmt tripal_jbrowse_page
-
-
-
-
- - name: PHPUnit Tests
- env:
- DRUSH: ${{ steps.tripalsetup.outputs.drush_path }}
- DRUPAL_ROOT: ${{ steps.tripalsetup.outputs.drupal_root }}
- run: |
- cd $DRUPAL_ROOT/sites/all/modules/tripal_jbrowse
- composer require --dev mheap/phpunit-github-actions-printer
- composer update
- cp tests/.travis.env tests/.env
- ./vendor/bin/phpunit --printer mheap\\GithubActionsReporter\\Printer
|