|
| 1 | +name: "CI" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - 'master' |
| 8 | + |
| 9 | +env: |
| 10 | + fail-fast: true |
| 11 | + TZ: "Europe/Paris" |
| 12 | + |
| 13 | +jobs: |
| 14 | + php-cs-fixer: |
| 15 | + name: "PHP-CS-Fixer (${{ matrix.php-version }})" |
| 16 | + |
| 17 | + runs-on: "ubuntu-latest" |
| 18 | + |
| 19 | + strategy: |
| 20 | + matrix: |
| 21 | + php-version: |
| 22 | + - '7.3' |
| 23 | + |
| 24 | + steps: |
| 25 | + - |
| 26 | + name: "Checkout code" |
| 27 | + uses: "actions/checkout@v2" |
| 28 | + |
| 29 | + - |
| 30 | + name: "Install PHP" |
| 31 | + uses: "shivammathur/setup-php@v2" |
| 32 | + with: |
| 33 | + coverage: "none" |
| 34 | + extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" |
| 35 | + php-version: "${{ matrix.php-version }}" |
| 36 | + tools: composer:v2 |
| 37 | + |
| 38 | + - |
| 39 | + name: "Composer install" |
| 40 | + uses: "ramsey/composer-install@v1" |
| 41 | + with: |
| 42 | + composer-options: "--no-scripts" |
| 43 | + |
| 44 | + - |
| 45 | + name: "Run friendsofphp/php-cs-fixer" |
| 46 | + run: "vendor/bin/php-cs-fixer fix --dry-run --diff --verbose" |
| 47 | + phpstan: |
| 48 | + name: "PHPStan (${{ matrix.php-version }})" |
| 49 | + |
| 50 | + runs-on: "ubuntu-latest" |
| 51 | + |
| 52 | + strategy: |
| 53 | + matrix: |
| 54 | + php-version: |
| 55 | + - '7.3' |
| 56 | + |
| 57 | + steps: |
| 58 | + - |
| 59 | + name: "Checkout code" |
| 60 | + uses: "actions/checkout@v2" |
| 61 | + |
| 62 | + - |
| 63 | + name: "Install PHP" |
| 64 | + uses: "shivammathur/setup-php@v2" |
| 65 | + with: |
| 66 | + coverage: "none" |
| 67 | + extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" |
| 68 | + php-version: "${{ matrix.php-version }}" |
| 69 | + tools: composer:v2 |
| 70 | + |
| 71 | + - |
| 72 | + name: "Composer install" |
| 73 | + uses: "ramsey/composer-install@v1" |
| 74 | + with: |
| 75 | + composer-options: "--no-scripts" |
| 76 | + |
| 77 | + - |
| 78 | + name: "Run PHPStan" |
| 79 | + run: "vendor/bin/phpstan analyse" |
| 80 | + phpunit: |
| 81 | + name: "PHPUnit (${{ matrix.php-version }})" |
| 82 | + |
| 83 | + runs-on: "ubuntu-latest" |
| 84 | + |
| 85 | + strategy: |
| 86 | + matrix: |
| 87 | + php-version: |
| 88 | + - '7.3' |
| 89 | + - '7.4' |
| 90 | + |
| 91 | + steps: |
| 92 | + - |
| 93 | + name: "Checkout code" |
| 94 | + uses: "actions/checkout@v2" |
| 95 | + |
| 96 | + - |
| 97 | + name: "Install PHP" |
| 98 | + uses: "shivammathur/setup-php@v2" |
| 99 | + with: |
| 100 | + coverage: "none" |
| 101 | + extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}" |
| 102 | + php-version: "${{ matrix.php-version }}" |
| 103 | + tools: composer:v2 |
| 104 | + |
| 105 | + - |
| 106 | + name: "Composer install" |
| 107 | + uses: "ramsey/composer-install@v1" |
| 108 | + with: |
| 109 | + composer-options: "--no-scripts" |
| 110 | + - |
| 111 | + name: "Run PHPUnit" |
| 112 | + run: "vendor/bin/phpunit" |
0 commit comments