diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..e4ae5f105 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,52 @@ +name: CI + +on: + pull_request: + push: + branches: [ master, 2.x, 1.x ] + +jobs: + run: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: + - '7.3' + - '7.4' + symfony-versions: [false] + include: + - description: 'Symfony 3.4' + php: '7.4' + symfony-versions: 3.4.* + - description: 'Symfony 4.4' + php: '7.4' + symfony-versions: 4.4.* + - description: 'Symfony 5.0' + php: '7.4' + symfony-versions: 5.0.* + - description: 'Symfony 5.2' + php: '7.4' + symfony-versions: 5.2.* + + name: PHP ${{ matrix.php }} Symfony ${{ matrix.description }} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: ${{ matrix.php }}-${{ matrix.symfony-versions }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Install dependencies + run: composer require "symfony/symfony:${{ matrix.symfony-versions }}" --no-update + if: matrix.symfony-versions + + - name: Install dependencies + run: composer install diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml new file mode 100644 index 000000000..373bdcf67 --- /dev/null +++ b/.github/workflows/static-analysis.yaml @@ -0,0 +1,45 @@ +name: Code style and static analysis + +on: + pull_request: + push: + branches: [ master, 2.x, 1.x ] + +jobs: + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Install dependencies + run: composer install --no-progress --no-interaction --prefer-dist + +# run phpcs +# - name: Run script +# run: vendor/bin/phpcs + + phpstan: + name: PHPStan + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Install dependencies + run: composer install --no-progress --no-interaction --prefer-dist + +## run PHPStan +# - name: Run script +# run: vendor/bin/phpstan analyse