-
Notifications
You must be signed in to change notification settings - Fork 5
30 lines (29 loc) · 1.16 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: test
on: [push, pull_request]
jobs:
phpunit:
name: PHPUnit with PHP ${{ matrix.php_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php_version: ['5.6', '7.0', '7.1', '7.2', '7.3']
container:
image: php:${{ matrix.php_version }}-cli
steps:
- uses: actions/checkout@master
- name: Install Dependencies
run: |
apt-get update
apt-get install -y git unzip
# Instal composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
# copy default php.ini
cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
# Install deps
composer install --no-progress --prefer-dist
- name: Run PHPunit
run: ./vendor/bin/phpunit