|
| 1 | +on: push |
| 2 | +name: CI |
| 3 | +jobs: |
| 4 | + tests: |
| 5 | + name: Tests |
| 6 | + runs-on: ubuntu-latest |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] |
| 10 | + |
| 11 | + steps: |
| 12 | + - name: Checkout |
| 13 | + uses: actions/checkout@v1 |
| 14 | + |
| 15 | + - name: Setup PHP |
| 16 | + uses: shivammathur/setup-php@v2 |
| 17 | + with: |
| 18 | + php-version: ${{ matrix.php-versions }} |
| 19 | + tools: "cs2pr" |
| 20 | + |
| 21 | + - name: "Cache dependencies installed with composer" |
| 22 | + uses: "actions/cache@v1" |
| 23 | + with: |
| 24 | + path: "~/.composer/cache" |
| 25 | + key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" |
| 26 | + restore-keys: "php-${{ matrix.php-version }}-composer-locked-" |
| 27 | + |
| 28 | + - name: "Composer" |
| 29 | + run: "composer update --prefer-stable" |
| 30 | + |
| 31 | + - name: "PHPUnit" |
| 32 | + run: "php vendor/bin/phpunit" |
| 33 | + |
| 34 | +# lint: |
| 35 | +# name: Lint |
| 36 | +# runs-on: ubuntu-latest |
| 37 | + |
| 38 | +# steps: |
| 39 | +# - name: Checkout |
| 40 | +# uses: actions/checkout@v1 |
| 41 | + |
| 42 | +# - name: Setup PHP |
| 43 | +# uses: shivammathur/setup-php@v2 |
| 44 | +# with: |
| 45 | +# php-version: 7.4 |
| 46 | + |
| 47 | +# - name: "Cache dependencies installed with composer" |
| 48 | +# uses: "actions/cache@v1" |
| 49 | +# with: |
| 50 | +# path: "~/.composer/cache" |
| 51 | +# key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" |
| 52 | +# restore-keys: "php-${{ matrix.php-version }}-composer-locked-" |
| 53 | + |
| 54 | +# - name: "Composer" |
| 55 | +# run: "composer update --prefer-stable" |
| 56 | + |
| 57 | +# - name: "assert:cs-lint" |
| 58 | +# run: "composer assert:cs-lint" |
| 59 | + |
| 60 | +# - name: "assert:sa-code" |
| 61 | +# run: "composer assert:sa-code" |
| 62 | + |
| 63 | +# - name: "assert:sa-tests" |
| 64 | +# run: "composer assert:sa-tests" |
0 commit comments