Skip to content

Commit

Permalink
Use GitGub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yozhef committed Jan 7, 2021
1 parent 3357cac commit c3eef07
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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 }} ${{ 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
45 changes: 45 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c3eef07

Please sign in to comment.