Merge pull request #10 from dfridrich/symfony-7 #40
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: CI build | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} ${{ matrix.extra-label }} ${{ matrix.composer-dependencies }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php-versions: [ '8.1', '8.2', '8.3' ] | |
composer-dependencies: [ '', '--prefer-lowest' ] | |
symfony-version: [ '' ] | |
extra-label: [ '' ] | |
include: | |
# SF 5.4 | |
- php-versions: '8.1' | |
operating-system: ubuntu-latest | |
symfony-version: '5.4.*' | |
extra-label: 'SF 5.4' | |
- php-versions: '8.1' | |
operating-system: windows-latest | |
coverage: xdebug | |
- php-versions: '8.2' | |
operating-system: ubuntu-latest | |
symfony-version: '7.0.*' | |
extra-label: 'SF 7.0' | |
- php-versions: '8.3' | |
operating-system: ubuntu-latest | |
symfony-version: '7.0.*' | |
extra-label: 'SF 7.0' | |
steps: | |
# see https://github.com/actions/checkout/issues/226#issue-606867805 | |
- name: Prepare git | |
run: git config --global core.autocrlf false | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
with: | |
php-version: ${{ matrix.php-versions }} | |
ini-values: memory_limit=-1 | |
tools: composer:v2 | |
coverage: ${{ matrix.coverage }} | |
extensions: pdo_sqlite | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Specific Symfony version | |
if: ${{ matrix.symfony-version != '' }} | |
run: composer require --dev --no-update symfony/symfony=${{ matrix.symfony-version }} | |
- name: Install Composer dependencies | |
run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-dependencies }} | |
- name: Run Build | |
run: composer run build | |
- name: Upload coverage results to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls --no-progress --prefer-dist --optimize-autoloader | |
php-coveralls --verbose --config build/coveralls.yml |