|
| 1 | +name: Test Suite |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + |
| 8 | +jobs: |
| 9 | + test: |
| 10 | + runs-on: ${{matrix.operating-system}} |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + operating-system: [ ubuntu-latest ] |
| 14 | + php: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4" ] |
| 15 | + name: PHP ${{matrix.php }} Unit Test |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v2 |
| 18 | + - name: Setup PHP |
| 19 | + uses: shivammathur/setup-php@v2 |
| 20 | + with: |
| 21 | + php-version: ${{ matrix.php }} |
| 22 | + - name: Install Dependencies |
| 23 | + uses: nick-invision/retry@v1 |
| 24 | + with: |
| 25 | + timeout_minutes: 10 |
| 26 | + max_attempts: 3 |
| 27 | + command: composer install |
| 28 | + - name: Run Script |
| 29 | + run: vendor/bin/phpunit |
| 30 | + # use dockerfiles for oooooolllllldddd versions of php, setup-php times out for those. |
| 31 | + test_php55: |
| 32 | + name: "PHP 5.5 Unit Test" |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - name: Checkout |
| 36 | + uses: actions/checkout@v2 |
| 37 | + - name: Run Unit Tests |
| 38 | + uses: docker://php:5.5-cli |
| 39 | + with: |
| 40 | + entrypoint: ./.github/actions/unittest/entrypoint.sh |
| 41 | + test_php54: |
| 42 | + name: "PHP 5.4 Unit Test" |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - name: Checkout |
| 46 | + uses: actions/checkout@v2 |
| 47 | + - name: Run Unit Tests |
| 48 | + uses: docker://php:5.4-cli |
| 49 | + with: |
| 50 | + entrypoint: ./.github/actions/unittest/entrypoint.sh |
| 51 | + test_php54_lowest: |
| 52 | + name: "PHP 5.4 Unit Test Prefer Lowest" |
| 53 | + runs-on: ubuntu-latest |
| 54 | + steps: |
| 55 | + - name: Checkout |
| 56 | + uses: actions/checkout@v2 |
| 57 | + - name: Run Unit Tests |
| 58 | + uses: docker://php:5.4-cli |
| 59 | + env: |
| 60 | + composerargs: "--prefer-lowest" |
| 61 | + with: |
| 62 | + entrypoint: ./.github/actions/unittest/entrypoint.sh |
| 63 | + style: |
| 64 | + runs-on: ubuntu-latest |
| 65 | + name: PHP Style Check |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v2 |
| 68 | + - name: Setup PHP |
| 69 | + uses: shivammathur/setup-php@v2 |
| 70 | + with: |
| 71 | + php-version: "7.4" |
| 72 | + - name: Install Dependencies |
| 73 | + uses: nick-invision/retry@v1 |
| 74 | + with: |
| 75 | + timeout_minutes: 10 |
| 76 | + max_attempts: 3 |
| 77 | + command: composer install |
| 78 | + - name: Run Script |
| 79 | + run: vendor/bin/phpcs src --standard=phpcs.xml.dist -np |
0 commit comments