Skip to content

Support Silverstripe 5 #60

Support Silverstripe 5

Support Silverstripe 5 #60

Workflow file for this run

name: Tests
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: PHP ${{ matrix.php_version }}
runs-on: ubuntu-latest
env:
DB: mysql
strategy:
matrix:
php_version: ['7.1']
services:
mysql:
image: mysql:5.7-debian
env:
MYSQL_DATABASE: test_database
MYSQL_HOST: 127.0.0.1
MYSQL_USER: admin
MYSQL_ALLOW_EMPTY_PASSWORD: 1
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Use PHP ${{ matrix.node_version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php${{ matrix.php_version }}-
- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader --verbose --profile
- name: Run test suite
run: vendor/bin/phpunit tests