|
| 1 | +name: Continuous Integration |
| 2 | +on: |
| 3 | + push: |
| 4 | + pull_request: |
| 5 | +jobs: |
| 6 | + lint: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - name: Lint Code Base |
| 10 | + uses: docker://github/super-linter:v2.2.0 |
| 11 | + composer-install: |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + php: [7.4] |
| 16 | + composer: [lowest, current, highest] |
| 17 | + needs: lint |
| 18 | + runs-on: ubuntu-latest |
| 19 | + container: |
| 20 | + image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v1 |
| 23 | + - name: Cache composer packages |
| 24 | + uses: actions/cache@v1 |
| 25 | + with: |
| 26 | + path: ./vendor/ |
| 27 | + key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} |
| 28 | + - name: Install Dependencies |
| 29 | + run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o |
| 30 | + if: matrix.composer == 'lowest' |
| 31 | + - name: Install Dependencies |
| 32 | + run: composer install --ansi --no-progress --no-interaction --prefer-dist -o |
| 33 | + if: matrix.composer == 'current' |
| 34 | + - name: Install Dependencies |
| 35 | + run: composer update --ansi --no-progress --no-interaction --prefer-dist -o |
| 36 | + if: matrix.composer == 'highest' |
| 37 | + qa: |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + php: [7.4] |
| 42 | + composer: [lowest, current, highest] |
| 43 | + qa: [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused, backward-compatibility-check] |
| 44 | + needs: composer-install |
| 45 | + runs-on: ubuntu-latest |
| 46 | + container: |
| 47 | + image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v1 |
| 50 | + - name: Cache composer packages |
| 51 | + uses: actions/cache@v1 |
| 52 | + with: |
| 53 | + path: ./vendor/ |
| 54 | + key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} |
| 55 | + - name: Install Dependencies |
| 56 | + run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o |
| 57 | + if: matrix.composer == 'lowest' |
| 58 | + - name: Install Dependencies |
| 59 | + run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o |
| 60 | + if: matrix.composer == 'current' |
| 61 | + - name: Install Dependencies |
| 62 | + run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o |
| 63 | + if: matrix.composer == 'highest' |
| 64 | + - name: Fetch Tags |
| 65 | + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* |
| 66 | + if: matrix.qa == 'backward-compatibility-check' |
| 67 | + - run: make ${{ matrix.qa }} |
0 commit comments