|
| 1 | +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions |
| 2 | +name: Main |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +jobs: |
| 8 | + tests_70: |
| 9 | + runs-on: "ubuntu-latest" |
| 10 | + name: "PHP 7.0 Unit Tests" |
| 11 | + steps: |
| 12 | + - name: "Checkout" |
| 13 | + uses: "actions/checkout@v2" |
| 14 | + - name: "Install PHP" |
| 15 | + uses: "shivammathur/setup-php@v2" |
| 16 | + with: |
| 17 | + coverage: "xdebug" |
| 18 | + php-version: "7.0" |
| 19 | + tools: composer:v2 |
| 20 | + - name: "Install dependencies" |
| 21 | + run: | |
| 22 | + composer require php-coveralls/php-coveralls:^2.2 --dev --no-update |
| 23 | + composer update --no-progress --prefer-dist |
| 24 | + - name: "Tests" |
| 25 | + run: "php vendor/bin/phpunit --coverage-clover build/logs/clover.xml" |
| 26 | + # This is erroring, not sure why. |
| 27 | + # - name: Coveralls |
| 28 | + # run: "php vendor/bin/php-coveralls" |
| 29 | + # if: ${{ success() }} |
| 30 | + tests: |
| 31 | + runs-on: "ubuntu-latest" |
| 32 | + name: "PHP ${{ matrix.php-version }} Unit Tests" |
| 33 | + strategy: |
| 34 | + matrix: |
| 35 | + php-version: |
| 36 | + - "7.1" |
| 37 | + - "7.2" |
| 38 | + - "7.3" |
| 39 | + - "7.4" |
| 40 | + - "8.0" |
| 41 | + steps: |
| 42 | + - name: "Checkout" |
| 43 | + uses: "actions/checkout@v2" |
| 44 | + - name: "Install PHP" |
| 45 | + uses: "shivammathur/setup-php@v2" |
| 46 | + with: |
| 47 | + coverage: "none" |
| 48 | + php-version: "${{ matrix.php-version }}" |
| 49 | + tools: composer:v2 |
| 50 | + - name: "Install dependencies" |
| 51 | + run: "composer update --no-progress --prefer-dist" |
| 52 | + - name: "PHPUnit" |
| 53 | + run: "php vendor/bin/phpunit" |
| 54 | + test_old_73_80: |
| 55 | + runs-on: "ubuntu-latest" |
| 56 | + name: "PHP 7.3 Code on PHP 8.0 Integration Tests" |
| 57 | + steps: |
| 58 | + - name: "Checkout" |
| 59 | + uses: "actions/checkout@v2" |
| 60 | + - name: "Install PHP" |
| 61 | + uses: "shivammathur/setup-php@v2" |
| 62 | + with: |
| 63 | + coverage: "none" |
| 64 | + php-version: "8.0" |
| 65 | + tools: composer:v2 |
| 66 | + - name: "Install PHP 8 dependencies" |
| 67 | + run: "composer update --no-progress --prefer-dist" |
| 68 | + - name: "Tests" |
| 69 | + run: "test_old/run-php-src.sh 7.3.21" |
| 70 | + test_old_80_70: |
| 71 | + runs-on: "ubuntu-latest" |
| 72 | + name: "PHP 8.0 Code on PHP 7.0 Integration Tests" |
| 73 | + steps: |
| 74 | + - name: "Checkout" |
| 75 | + uses: "actions/checkout@v2" |
| 76 | + - name: "Install PHP" |
| 77 | + uses: "shivammathur/setup-php@v2" |
| 78 | + with: |
| 79 | + coverage: "none" |
| 80 | + php-version: "7.0" |
| 81 | + tools: composer:v2 |
| 82 | + - name: "Install PHP 8 dependencies" |
| 83 | + run: "composer update --no-progress --prefer-dist" |
| 84 | + - name: "Tests" |
| 85 | + run: "test_old/run-php-src.sh 8.0.0" |
0 commit comments