Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions ci/php.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: PHP Composer
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: PHP

on:
push:
Expand All @@ -10,18 +15,37 @@ jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
php-version: ['7.2', '7.3', '7.4']

steps:
- uses: actions/checkout@v2

# Setup PHP environment.
# Docs: https://github.com/shivammathur/setup-php/blob/master/README.md
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@7961bc11b161170a2cf13fbe3573edb88fad7c29
with:
php-version: ${{ matrix.php-version }}
# extensions: mbstring, intl # (optional) Specify the extensions you want to add or remove.
# ini-values: short_open_tag=On # (optional) Specify the values you want to add to php.ini.
# coverage: xdebug # (optional) Specify the code coverage driver you want to setup.
# tools: pecl # (optional) Specify the tools you want to setup

- name: Validate composer.json and composer.lock
run: composer validate

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
Expand Down