|
| 1 | +name: Full CI process |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - master |
| 9 | + |
| 10 | +jobs: |
| 11 | + test: |
| 12 | + name: PHP ${{ matrix.php-versions }} |
| 13 | + runs-on: ubuntu-18.04 |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + include: |
| 18 | + - PHP_VERSION: '7.1' |
| 19 | + SYMFONY_REQUIRE: '^3.4' |
| 20 | + - PHP_VERSION: '7.2' |
| 21 | + SYMFONY_REQUIRE: '^4.4' |
| 22 | + - PHP_VERSION: '7.3' |
| 23 | + SYMFONY_REQUIRE: '^5.0' |
| 24 | + - PHP_VERSION: '7.4' |
| 25 | + |
| 26 | + steps: |
| 27 | + # —— Setup Github actions 🐙 ————————————————————————————————————————————— |
| 28 | + # https://github.com/actions/checkout (official) |
| 29 | + - |
| 30 | + name: Checkout |
| 31 | + uses: actions/checkout@v2 |
| 32 | + |
| 33 | + # https://github.com/shivammathur/setup-php (community) |
| 34 | + - |
| 35 | + name: Setup PHP, extensions and composer with shivammathur/setup-php |
| 36 | + uses: shivammathur/setup-php@v2 |
| 37 | + with: |
| 38 | + php-version: ${{ matrix.PHP_VERSION }} |
| 39 | + extensions: mbstring, ctype, iconv, bcmath, filter, json |
| 40 | + coverage: none |
| 41 | + env: |
| 42 | + update: true |
| 43 | + |
| 44 | + # —— Composer 🧙️ ————————————————————————————————————————————————————————— |
| 45 | + - |
| 46 | + name: Install Composer dependencies |
| 47 | + env: |
| 48 | + SYMFONY_REQUIRE: ${{ matrix.SYMFONY_REQUIRE }} |
| 49 | + SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 |
| 50 | + SYMFONY_PHPUNIT_REMOVE: "symfony/yaml" |
| 51 | + SYMFONY_PHPUNIT_VERSION: '7.5.6' |
| 52 | + run: | |
| 53 | + git config --global author.name Sebastiaan Stok |
| 54 | + git config --global author.email [email protected] |
| 55 | + git config --global user.name Sebastiaan Stok |
| 56 | + git config --global user.email [email protected] |
| 57 | +
|
| 58 | + rm -f composer.lock |
| 59 | + composer global require symfony/flex |
| 60 | + composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi |
| 61 | +
|
| 62 | + ## —— Tests ✅ ——————————————————————————————————————————————————————————— |
| 63 | + - |
| 64 | + name: Run Tests |
| 65 | + run: | |
| 66 | + make test |
| 67 | + lint: |
| 68 | + name: PHP-QA |
| 69 | + runs-on: ubuntu-latest |
| 70 | + strategy: |
| 71 | + fail-fast: false |
| 72 | + steps: |
| 73 | + - |
| 74 | + name: Checkout |
| 75 | + uses: actions/checkout@v2 |
| 76 | + |
| 77 | + # https://github.com/shivammathur/setup-php (community) |
| 78 | + - |
| 79 | + name: Setup PHP, extensions and composer with shivammathur/setup-php |
| 80 | + uses: shivammathur/setup-php@v2 |
| 81 | + with: |
| 82 | + php-version: '7.4' |
| 83 | + extensions: mbstring, ctype, iconv, bcmath, filter, json |
| 84 | + coverage: none |
| 85 | + |
| 86 | + # —— Composer 🧙️ ————————————————————————————————————————————————————————— |
| 87 | + - |
| 88 | + name: Install Composer dependencies |
| 89 | + run: | |
| 90 | + rm -f composer.lock |
| 91 | + composer global require symfony/flex |
| 92 | + composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi |
| 93 | +
|
| 94 | + - |
| 95 | + name: Run PHP-QA |
| 96 | + run: | |
| 97 | + make cs-full |
0 commit comments