8
0
Fork 0
daux.io/.github/workflows/php.yml

44 Zeilen
1.2 KiB
YAML

2019-11-14 08:17:17 +01:00
name: CI
on: [push]
jobs:
build:
2019-11-14 08:26:13 +01:00
strategy:
max-parallel: 15
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.1', '7.2', '7.3']
2019-11-14 08:17:17 +01:00
2019-11-14 08:26:13 +01:00
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
2019-11-14 08:17:17 +01:00
steps:
- uses: actions/checkout@v1
2019-11-14 08:26:13 +01:00
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug
coverage: xdebug
2019-11-14 08:17:17 +01:00
- name: Validate composer.json and composer.lock
run: composer validate
2019-11-14 08:19:32 +01:00
- name: Cache vendor
uses: actions/cache@v1
with:
path: node_modules
2019-11-14 08:26:13 +01:00
key: ${{ runner.OS }}-build-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
2019-11-14 08:19:32 +01:00
restore-keys: |
2019-11-14 08:26:13 +01:00
${{ runner.OS }}-build-${{ matrix.php-versions }}-${{ env.cache-name }}-
${{ runner.OS }}-build-${{ matrix.php-versions }}-
2019-11-14 08:19:32 +01:00
${{ runner.OS }}-build-
2019-11-14 08:17:17 +01:00
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer run-script test