|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + supported-versions-matrix: |
| 11 | + name: Supported Versions Matrix |
| 12 | + runs-on: ubuntu-latest |
| 13 | + outputs: |
| 14 | + version: ${{ steps.supported-versions-matrix.outputs.version }} |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v3 |
| 17 | + - id: supported-versions-matrix |
| 18 | + uses: WyriHaximus/github-action-composer-php-versions-in-range@v1 |
| 19 | + latest: |
| 20 | + name: PHP ${{ matrix.php }} Latest |
| 21 | + runs-on: ubuntu-latest |
| 22 | + needs: |
| 23 | + - supported-versions-matrix |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }} |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Checkout code |
| 30 | + uses: actions/checkout@v2 |
| 31 | + |
| 32 | + - name: Setup PHP |
| 33 | + uses: shivammathur/setup-php@v2 |
| 34 | + with: |
| 35 | + php-version: ${{ matrix.php }} |
| 36 | + tools: composer |
| 37 | + coverage: none |
| 38 | + |
| 39 | + - name: Install dependencies |
| 40 | + run: composer update --prefer-dist --no-interaction --no-progress |
| 41 | + |
| 42 | + - name: boot test server |
| 43 | + run: vendor/bin/http_test_server > /dev/null 2>&1 & |
| 44 | + |
| 45 | + - name: Execute tests |
| 46 | + run: composer test |
| 47 | + |
| 48 | + lowest: |
| 49 | + name: PHP ${{ matrix.php }} Lowest |
| 50 | + runs-on: ubuntu-latest |
| 51 | + needs: |
| 52 | + - supported-versions-matrix |
| 53 | + strategy: |
| 54 | + matrix: |
| 55 | + php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }} |
| 56 | + |
| 57 | + steps: |
| 58 | + - name: Checkout code |
| 59 | + uses: actions/checkout@v2 |
| 60 | + |
| 61 | + - name: Setup PHP |
| 62 | + uses: shivammathur/setup-php@v2 |
| 63 | + with: |
| 64 | + php-version: ${{ matrix.php }} |
| 65 | + tools: composer |
| 66 | + coverage: none |
| 67 | + |
| 68 | + - name: Install dependencies |
| 69 | + run: composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress |
| 70 | + |
| 71 | + - name: boot test server |
| 72 | + run: vendor/bin/http_test_server > /dev/null 2>&1 & |
| 73 | + |
| 74 | + - name: Execute tests |
| 75 | + run: composer test |
| 76 | + |
| 77 | + coverage: |
| 78 | + name: Code Coverage |
| 79 | + runs-on: ubuntu-latest |
| 80 | + |
| 81 | + steps: |
| 82 | + - name: Checkout code |
| 83 | + uses: actions/checkout@v2 |
| 84 | + |
| 85 | + - name: Setup PHP |
| 86 | + uses: shivammathur/setup-php@v2 |
| 87 | + with: |
| 88 | + php-version: 7.4 |
| 89 | + tools: composer |
| 90 | + coverage: xdebug |
| 91 | + |
| 92 | + - name: Install dependencies |
| 93 | + run: composer update --prefer-dist --no-interaction --no-progress |
| 94 | + |
| 95 | + - name: generate ssl |
| 96 | + run: cd ./tests/server/ssl && ./generate.sh && pwd && ls -la && cd ../../../ |
| 97 | + |
| 98 | + - name: Execute tests |
| 99 | + run: composer test-ci |
0 commit comments