|
| 1 | +name: build |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + security: |
| 7 | + name: Security |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + php: [ '8.1' ] |
| 13 | + os: [ ubuntu-latest ] |
| 14 | + steps: |
| 15 | + - name: Set Git To Use LF |
| 16 | + run: | |
| 17 | + git config --global core.autocrlf false |
| 18 | + git config --global core.eol lf |
| 19 | + - name: Checkout |
| 20 | + uses: actions/checkout@v2 |
| 21 | + - name: Setup PHP ${{ matrix.php }} |
| 22 | + uses: shivammathur/setup-php@v2 |
| 23 | + with: |
| 24 | + php-version: ${{ matrix.php }} |
| 25 | + - name: Install Dependencies |
| 26 | + uses: nick-invision/retry@v1 |
| 27 | + with: |
| 28 | + timeout_minutes: 5 |
| 29 | + max_attempts: 5 |
| 30 | + command: composer update --prefer-dist --no-interaction --no-progress |
| 31 | + - name: Security Advisories |
| 32 | + run: composer require --dev roave/security-advisories:dev-latest |
| 33 | + |
| 34 | + static-analysis: |
| 35 | + name: Psalm |
| 36 | + runs-on: ${{ matrix.os }} |
| 37 | + strategy: |
| 38 | + fail-fast: false |
| 39 | + matrix: |
| 40 | + php: [ '8.1' ] |
| 41 | + os: [ ubuntu-latest ] |
| 42 | + |
| 43 | + steps: |
| 44 | + - name: Set Git To Use LF |
| 45 | + run: | |
| 46 | + git config --global core.autocrlf false |
| 47 | + git config --global core.eol lf |
| 48 | +
|
| 49 | + - name: Checkout |
| 50 | + uses: actions/checkout@v2 |
| 51 | + |
| 52 | + - name: Setup PHP ${{ matrix.php }} |
| 53 | + uses: shivammathur/setup-php@v2 |
| 54 | + with: |
| 55 | + php-version: ${{ matrix.php }} |
| 56 | + tools: composer:v2 |
| 57 | + |
| 58 | + - name: Install Dependencies |
| 59 | + uses: nick-invision/retry@v1 |
| 60 | + with: |
| 61 | + timeout_minutes: 5 |
| 62 | + max_attempts: 5 |
| 63 | + command: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress |
| 64 | + |
| 65 | + - name: Static Analysis |
| 66 | + continue-on-error: true |
| 67 | + run: vendor/bin/psalm --no-cache |
| 68 | + |
| 69 | + coding-standards: |
| 70 | + name: Coding Standards |
| 71 | + runs-on: ${{ matrix.os }} |
| 72 | + strategy: |
| 73 | + fail-fast: false |
| 74 | + matrix: |
| 75 | + php: [ '8.1' ] |
| 76 | + os: [ ubuntu-latest ] |
| 77 | + |
| 78 | + steps: |
| 79 | + - name: Checkout |
| 80 | + uses: actions/checkout@v2 |
| 81 | + |
| 82 | + - name: Setup PHP ${{ matrix.php }} |
| 83 | + uses: shivammathur/setup-php@v2 |
| 84 | + with: |
| 85 | + php-version: ${{ matrix.php }} |
| 86 | + tools: composer:v2 |
| 87 | + |
| 88 | + - name: Install Dependencies |
| 89 | + uses: nick-invision/retry@v1 |
| 90 | + with: |
| 91 | + timeout_minutes: 5 |
| 92 | + max_attempts: 5 |
| 93 | + command: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress |
| 94 | + |
| 95 | + - name: Check Coding Standards |
| 96 | + run: vendor/bin/phpcs --standard=phpcs.xml |
| 97 | + |
| 98 | + test: |
| 99 | + name: Build (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }}) |
| 100 | + runs-on: ${{ matrix.os }} |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + php: [ '8.1', '8.2' ] |
| 105 | + os: [ ubuntu-latest, macos-latest, windows-latest ] |
| 106 | + stability: [ prefer-lowest, prefer-stable ] |
| 107 | + |
| 108 | + steps: |
| 109 | + - name: Checkout |
| 110 | + uses: actions/checkout@v2 |
| 111 | + |
| 112 | + - name: Setup PHP ${{ matrix.php }} |
| 113 | + uses: shivammathur/setup-php@v2 |
| 114 | + with: |
| 115 | + php-version: ${{ matrix.php }} |
| 116 | + tools: composer:v2 |
| 117 | + |
| 118 | + - name: Install Dependencies |
| 119 | + uses: nick-invision/retry@v1 |
| 120 | + with: |
| 121 | + timeout_minutes: 5 |
| 122 | + max_attempts: 5 |
| 123 | + command: composer update --${{ matrix.stability }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress |
| 124 | + |
| 125 | + - name: Execute Tests |
| 126 | + run: vendor/bin/phpunit |
0 commit comments