|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + old: |
| 7 | + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} |
| 8 | + runs-on: ${{ matrix.operating-system }} |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + operating-system: ['ubuntu-16.04'] |
| 12 | + php-versions: ['5.4', '5.5', '5.6', '7.0'] |
| 13 | + phpunit-versions: ['7.5.20'] |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v2 |
| 17 | + |
| 18 | + - name: Setup PHP |
| 19 | + uses: shivammathur/setup-php@v2 |
| 20 | + with: |
| 21 | + php-version: ${{ matrix.php-versions }} |
| 22 | + extensions: mbstring, intl |
| 23 | + ini-values: post_max_size=256M, max_execution_time=180 |
| 24 | + tools: psalm, phpunit:${{ matrix.phpunit-versions }} |
| 25 | + |
| 26 | + - name: Fix permissions |
| 27 | + run: sudo chmod -R 0777 . |
| 28 | + |
| 29 | + - name: Install dependencies |
| 30 | + run: composer self-update --1; composer install |
| 31 | + |
| 32 | + - name: PHPUnit tests |
| 33 | + uses: php-actions/phpunit@v2 |
| 34 | + with: |
| 35 | + memory_limit: 256M |
| 36 | + |
| 37 | + moderate: |
| 38 | + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} |
| 39 | + runs-on: ${{ matrix.operating-system }} |
| 40 | + strategy: |
| 41 | + matrix: |
| 42 | + operating-system: ['ubuntu-latest'] |
| 43 | + php-versions: ['7.1', '7.2', '7.3'] |
| 44 | + phpunit-versions: ['latest'] |
| 45 | + steps: |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@v2 |
| 48 | + |
| 49 | + - name: Setup PHP |
| 50 | + uses: shivammathur/setup-php@v2 |
| 51 | + with: |
| 52 | + php-version: ${{ matrix.php-versions }} |
| 53 | + extensions: mbstring, intl, sodium |
| 54 | + ini-values: post_max_size=256M, max_execution_time=180 |
| 55 | + tools: psalm, phpunit:${{ matrix.phpunit-versions }} |
| 56 | + |
| 57 | + - name: Fix permissions |
| 58 | + run: sudo chmod -R 0777 . |
| 59 | + |
| 60 | + - name: Install dependencies |
| 61 | + run: composer install |
| 62 | + |
| 63 | + - name: PHPUnit tests |
| 64 | + uses: php-actions/phpunit@v2 |
| 65 | + timeout-minutes: 30 |
| 66 | + with: |
| 67 | + memory_limit: 256M |
| 68 | + |
| 69 | + modern: |
| 70 | + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} |
| 71 | + runs-on: ${{ matrix.operating-system }} |
| 72 | + strategy: |
| 73 | + matrix: |
| 74 | + operating-system: ['ubuntu-latest'] |
| 75 | + php-versions: ['7.4', '8.0'] |
| 76 | + phpunit-versions: ['latest'] |
| 77 | + steps: |
| 78 | + - name: Checkout |
| 79 | + uses: actions/checkout@v2 |
| 80 | + |
| 81 | + - name: Setup PHP |
| 82 | + uses: shivammathur/setup-php@v2 |
| 83 | + with: |
| 84 | + php-version: ${{ matrix.php-versions }} |
| 85 | + extensions: mbstring, intl, sodium |
| 86 | + ini-values: post_max_size=256M, max_execution_time=180 |
| 87 | + tools: psalm, phpunit:${{ matrix.phpunit-versions }} |
| 88 | + |
| 89 | + - name: Fix permissions |
| 90 | + run: sudo chmod -R 0777 . |
| 91 | + |
| 92 | + - name: Install dependencies |
| 93 | + run: composer install |
| 94 | + |
| 95 | + - name: PHPUnit tests |
| 96 | + uses: php-actions/phpunit@v2 |
| 97 | + timeout-minutes: 30 |
| 98 | + with: |
| 99 | + memory_limit: 256M |
| 100 | + |
| 101 | + - name: Install Psalm |
| 102 | + if: contains(['7.4', '8.0'], ${{ matrix.php-version }}) |
| 103 | + run: composer require --dev vimeo/psalm:^4 |
| 104 | + |
| 105 | + - name: Static Analysis |
| 106 | + if: contains(['7.4', '8.0], ${{ matrix.php-version }}) |
| 107 | + run: vendor/bin/psalm |
0 commit comments