8
0
daux.io/.github/workflows/php.yml
2019-11-14 08:30:21 +01:00

46 Zeilen
1.2 KiB
YAML

name: CI
on: [push]
jobs:
build:
strategy:
max-parallel: 15
matrix:
# TODO : enable tests on windows
operating-system: [ubuntu-latest, macOS-latest]
php-versions: ['7.1', '7.2', '7.3']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug
coverage: xdebug
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache vendor
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer run-script test