1+ # GitHub Action for PHP Plugins Google Spreadsheets by Bear
2+ name : Testing PHP Plugins Google Spreadsheets by Bear
3+ on : [ push, pull_request ]
4+ jobs :
5+ build :
6+ strategy :
7+ matrix :
8+ operating-system : [ ubuntu-latest, windows-latest, macos-latest ]
9+ php-versions : [ '5.6', '7.0', '8.0' ]
10+ runs-on : ${{ matrix.operating-system }}
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v2
14+ - name : Setup PHP, with composer and extensions
15+ uses : shivammathur/setup-php@v2 # From https://github.com/shivammathur/setup-php
16+ with :
17+ php-version : ${{ matrix.php-versions }}
18+ extensions : mbstring, intl, curl, json, openssl, iconv
19+ coverage : xdebug # optional
20+ - name : Get composer cache directory
21+ id : composercache
22+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
23+ - name : Cache composer dependencies
24+ uses : actions/cache@v2
25+ with :
26+ path : ${{ steps.composercache.outputs.dir }}
27+ # Use composer.json for key, if composer.lock is not committed.
28+ # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
29+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
30+ restore-keys : ${{ runner.os }}-composer-
31+ - name : Install dependencies
32+ run : composer install --no-progress --prefer-dist --optimize-autoloader
0 commit comments