|
| 1 | +name: "Check Demo Scripts" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + |
| 7 | +jobs: |
| 8 | + demo-scripts: |
| 9 | + name: "Check Demo Scripts" |
| 10 | + |
| 11 | + runs-on: ${{ matrix.operating-system }} |
| 12 | + |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + dependencies: |
| 16 | + - "locked" |
| 17 | + php-version: |
| 18 | + - "7.4" |
| 19 | + operating-system: |
| 20 | + - "ubuntu-latest" |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: "Checkout" |
| 24 | + uses: "actions/checkout@v2" |
| 25 | + |
| 26 | + - name: "Install PHP" |
| 27 | + uses: "shivammathur/setup-php@v2" |
| 28 | + with: |
| 29 | + coverage: "pcov" |
| 30 | + php-version: "${{ matrix.php-version }}" |
| 31 | + ini-values: memory_limit=-1 |
| 32 | + tools: composer:v2, cs2pr |
| 33 | + |
| 34 | + - name: "Cache dependencies" |
| 35 | + uses: "actions/cache@v2" |
| 36 | + with: |
| 37 | + path: | |
| 38 | + ~/.composer/cache |
| 39 | + vendor |
| 40 | + key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" |
| 41 | + restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" |
| 42 | + |
| 43 | + - name: "Install lowest dependencies" |
| 44 | + if: ${{ matrix.dependencies == 'lowest' }} |
| 45 | + run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" |
| 46 | + |
| 47 | + - name: "Install highest dependencies" |
| 48 | + if: ${{ matrix.dependencies == 'highest' }} |
| 49 | + run: "composer update --no-interaction --no-progress --no-suggest" |
| 50 | + |
| 51 | + - name: "Install locked dependencies" |
| 52 | + if: ${{ matrix.dependencies == 'locked' }} |
| 53 | + run: "composer install --no-interaction --no-progress --no-suggest" |
| 54 | + |
| 55 | + - name: "Check Demo Scripts" |
| 56 | + run: | |
| 57 | + php examples/access-interceptor-scope-localizer.php |
| 58 | + php examples/ghost-object.php |
| 59 | + php examples/ghost-object-skipped-properties.php |
| 60 | + php examples/smart-reference.php |
| 61 | + php examples/virtual-proxy.php |
| 62 | +
|
| 63 | + - name: "Check Static Analysis Scripts" |
| 64 | + run: | |
| 65 | + php tests/static-analysis/access-interceptor-scope-localizer.php |
| 66 | + php tests/static-analysis/lazy-loading-ghost-object.php |
| 67 | + php tests/static-analysis/null-object.php |
| 68 | + php tests/static-analysis/access-interceptor-value-holder.php |
| 69 | + php tests/static-analysis/lazy-loading-value-holder.php |
| 70 | + php tests/static-analysis/remote-object.php |
0 commit comments