|  | 
|  | 1 | +name: "tests" | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | + push: | 
|  | 5 | + branches: | 
|  | 6 | + - "master" | 
|  | 7 | + pull_request: | 
|  | 8 | + | 
|  | 9 | +jobs: | 
|  | 10 | + phpstan: | 
|  | 11 | + name: "PHPStan" | 
|  | 12 | + runs-on: "ubuntu-latest" | 
|  | 13 | + steps: | 
|  | 14 | + - name: "Checkout code" | 
|  | 15 | + uses: "actions/checkout@v2" | 
|  | 16 | + | 
|  | 17 | + - name: "Setup PHP" | 
|  | 18 | + uses: "shivammathur/setup-php@v2" | 
|  | 19 | + with: | 
|  | 20 | + php-version: "7.3" | 
|  | 21 | + extensions: "curl, soap" | 
|  | 22 | + tools: "composer:v2" | 
|  | 23 | + | 
|  | 24 | + - name: "Check Composer configuration" | 
|  | 25 | + run: "composer validate --strict" | 
|  | 26 | + | 
|  | 27 | + - name: "Install dependencies" | 
|  | 28 | + run: "composer update --prefer-dist --no-interaction --no-progress" | 
|  | 29 | + | 
|  | 30 | + - name: "Execute static analysis" | 
|  | 31 | + run: "composer run-script phpstan" | 
|  | 32 | + | 
|  | 33 | + lint: | 
|  | 34 | + name: "PHP-CS-Fixer" | 
|  | 35 | + runs-on: "ubuntu-latest" | 
|  | 36 | + steps: | 
|  | 37 | + - name: "Checkout code" | 
|  | 38 | + uses: "actions/checkout@v2" | 
|  | 39 | + | 
|  | 40 | + - name: "Setup PHP" | 
|  | 41 | + uses: "shivammathur/setup-php@v2" | 
|  | 42 | + with: | 
|  | 43 | + php-version: "7.3" | 
|  | 44 | + extensions: "curl, soap" | 
|  | 45 | + tools: "composer:v2" | 
|  | 46 | + | 
|  | 47 | + - name: "Check Composer configuration" | 
|  | 48 | + run: "composer validate --strict" | 
|  | 49 | + | 
|  | 50 | + - name: "Install dependencies" | 
|  | 51 | + run: "composer update --prefer-dist --no-interaction --no-progress" | 
|  | 52 | + | 
|  | 53 | + - name: "Execute linting" | 
|  | 54 | + run: "composer run-script lint" | 
|  | 55 | + | 
|  | 56 | + tests: | 
|  | 57 | + strategy: | 
|  | 58 | + fail-fast: true | 
|  | 59 | + matrix: | 
|  | 60 | + php: ["7.3", "7.4"] | 
|  | 61 | + composer_flags: ["", "--prefer-lowest"] | 
|  | 62 | + | 
|  | 63 | + name: "Tests PHP ${{ matrix.php }} ${{ matrix.composer_flags}}" | 
|  | 64 | + | 
|  | 65 | + runs-on: "ubuntu-latest" | 
|  | 66 | + | 
|  | 67 | + steps: | 
|  | 68 | + - name: "Checkout code" | 
|  | 69 | + uses: "actions/checkout@v2" | 
|  | 70 | + | 
|  | 71 | + - name: "Setup PHP" | 
|  | 72 | + uses: "shivammathur/setup-php@v2" | 
|  | 73 | + with: | 
|  | 74 | + php-version: "${{ matrix.php }}" | 
|  | 75 | + extensions: "curl, soap" | 
|  | 76 | + tools: "composer:v2" | 
|  | 77 | + coverage: "pcov" | 
|  | 78 | + | 
|  | 79 | + - name: "Check Composer configuration" | 
|  | 80 | + run: "composer validate --strict" | 
|  | 81 | + | 
|  | 82 | + - name: "Install dependencies" | 
|  | 83 | + run: "composer update -o ${{ matrix.composer_flags }} --prefer-dist --no-interaction --no-progress" | 
|  | 84 | + | 
|  | 85 | + - name: "Execute tests" | 
|  | 86 | + run: "vendor/bin/phpunit --coverage-clover=coverage.clover" | 
|  | 87 | + | 
|  | 88 | + - name: "Upload code coverage" | 
|  | 89 | + run: "wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover" | 
|  | 90 | + | 
|  | 91 | + guzzle: | 
|  | 92 | + strategy: | 
|  | 93 | + fail-fast: true | 
|  | 94 | + matrix: | 
|  | 95 | + guzzle: ["3", "5", "6"] | 
|  | 96 | + | 
|  | 97 | + name: "Integration test for Guzzle ${{ matrix.guzzle }}" | 
|  | 98 | + | 
|  | 99 | + runs-on: "ubuntu-latest" | 
|  | 100 | + | 
|  | 101 | + steps: | 
|  | 102 | + - name: "Checkout code" | 
|  | 103 | + uses: "actions/checkout@v2" | 
|  | 104 | + | 
|  | 105 | + - name: "Setup PHP" | 
|  | 106 | + uses: "shivammathur/setup-php@v2" | 
|  | 107 | + with: | 
|  | 108 | + php-version: "7.3" | 
|  | 109 | + extensions: "curl, soap" | 
|  | 110 | + tools: "composer:v2" | 
|  | 111 | + coverage: "pcov" | 
|  | 112 | + | 
|  | 113 | + - name: "Check Composer configuration" | 
|  | 114 | + run: "composer validate --strict" | 
|  | 115 | + | 
|  | 116 | + - name: "Install dependencies" | 
|  | 117 | + run: "composer update --prefer-dist --no-interaction --no-progress" | 
|  | 118 | + | 
|  | 119 | + - name: "Execute tests" | 
|  | 120 | + run: "cd tests/integration/guzzle/${{ matrix.guzzle }}/ && composer update --prefer-dist --no-interaction --no-progress && ../../../../vendor/bin/phpunit --coverage-clover=coverage.clover" | 
|  | 121 | + | 
|  | 122 | + - name: "Upload code coverage" | 
|  | 123 | + run: "wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover" | 
|  | 124 | + | 
|  | 125 | + soap: | 
|  | 126 | + strategy: | 
|  | 127 | + fail-fast: true | 
|  | 128 | + | 
|  | 129 | + name: "SOAP integration test" | 
|  | 130 | + | 
|  | 131 | + runs-on: "ubuntu-latest" | 
|  | 132 | + | 
|  | 133 | + steps: | 
|  | 134 | + - name: "Checkout code" | 
|  | 135 | + uses: "actions/checkout@v2" | 
|  | 136 | + | 
|  | 137 | + - name: "Setup PHP" | 
|  | 138 | + uses: "shivammathur/setup-php@v2" | 
|  | 139 | + with: | 
|  | 140 | + php-version: "7.3" | 
|  | 141 | + extensions: "curl, soap" | 
|  | 142 | + tools: "composer:v2" | 
|  | 143 | + coverage: "pcov" | 
|  | 144 | + | 
|  | 145 | + - name: "Check Composer configuration" | 
|  | 146 | + run: "composer validate --strict" | 
|  | 147 | + | 
|  | 148 | + - name: "Install dependencies" | 
|  | 149 | + run: "composer update --prefer-dist --no-interaction --no-progress" | 
|  | 150 | + | 
|  | 151 | + - name: "Execute tests" | 
|  | 152 | + run: "cd tests/integration/soap/ && composer update --prefer-dist --no-interaction --no-progress && ../../../vendor/bin/phpunit --coverage-clover=coverage.clover" | 
|  | 153 | + | 
|  | 154 | + - name: "Upload code coverage" | 
|  | 155 | + run: "wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover" | 
0 commit comments