Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
DevKit updates (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Aug 27, 2020
1 parent cc833ca commit 827408e
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/test.yaml
@@ -0,0 +1,102 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

name: Test

on:
push:
branches:
- master
- 2.x

pull_request:
paths: ['**.php', '**.yml', '**.yaml', '**.xml', '**.twig', '**.js', '**.css', '**.json']

jobs:
test:
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }}

runs-on: ubuntu-latest

continue-on-error: ${{ matrix.allowed_to_fail }}

strategy:
matrix:
php-version:
- '7.2'
- '7.3'
- '7.4'
dependencies: [highest]
allowed_to_fail: [false]
variant: [normal]
include:
- php-version: '7.2'
dependencies: lowest
allowed_to_fail: false
variant: normal
- php-version: '8.0'
dependencies: highest
allowed_to_fail: true
variant: normal
- php-version: '7.3'
dependencies: highest
allowed_to_fail: false
variant: 'symfony/symfony:"4.4.*"'
- php-version: '7.3'
dependencies: highest
allowed_to_fail: false
variant: 'sonata-project/admin-bundle:"3.*"'
- php-version: '7.3'
dependencies: highest
allowed_to_fail: false
variant: 'sonata-project/block-bundle:"3.*"'

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2

- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

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

- name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ matrix.variant }}
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-

- name: Install variant
if: matrix.variant != 'normal'
run: composer require ${{ matrix.variant }} --no-update

- name: Install Composer dependencies (lowest)
if: matrix.dependencies == 'lowest'
run: composer update --prefer-dist --no-progress --no-interaction --prefer-stable --prefer-lowest

- name: Install Composer dependencies (highest)
if: matrix.dependencies == 'highest' && matrix.php-version != '8.0'
run: composer update --prefer-dist --no-progress --no-interaction --prefer-stable

- name: Install Composer dependencies (highest) on PHP 8.0
if: matrix.dependencies == 'highest' && matrix.php-version == '8.0'
run: composer update --prefer-dist --no-progress --no-interaction --prefer-stable --ignore-platform-req=php

- name: Run Tests
run: make test

- name: Send coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: build/logs/clover.xml

0 comments on commit 827408e

Please sign in to comment.