Merge pull request #21 from nightlinus/fix/remove_deprecation_notices… #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
tags: | |
pull_request: | |
jobs: | |
build: | |
name: PHP ${{ matrix.php }} with ${{ matrix.packages }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: ubuntu-latest, php: 7.1, experimental: false} | |
- { os: ubuntu-latest, php: 7.2, experimental: false} | |
- { os: ubuntu-latest, php: 7.3, experimental: false} | |
- { os: ubuntu-latest, php: 7.4, experimental: false} | |
- { os: ubuntu-latest, php: 8.0, experimental: false} | |
- { os: ubuntu-latest, php: 8.1, experimental: true} | |
- { os: ubuntu-latest, php: 7.1, packages: symfony/symfony=3.4.*, experimental: false} | |
- { os: ubuntu-latest, php: 7.1, packages: symfony/symfony=4.0.*, experimental: false} | |
- { os: ubuntu-latest, php: 8.0, packages: symfony/symfony=4.*, experimental: false} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: json, mbstring | |
tools: composer | |
- name: Show PHP and composer version | |
run: php -v && composer -V | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer packages | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: | | |
echo ${PACKAGES} | |
composer require --no-update ${PACKAGES} | |
composer install --prefer-source | |
env: | |
PACKAGES: ${{ matrix.packages}} | |
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" | |
# Docs: https://getcomposer.org/doc/articles/scripts.md | |
- name: Run test suite | |
run: ./vendor/bin/phpunit |