33 push :
44 pull_request :
55jobs :
6+ generate-checks-strategy :
7+ name : Generate Checks
8+ runs-on : ubuntu-latest
9+ outputs :
10+ check : ${{ steps.generate-checks-strategy.outputs.check }}
11+ steps :
12+ - uses : actions/checkout@v1
13+ - id : generate-checks-strategy
14+ name : Generate check
15+ run : |
16+ printf "Checks found: %s\r\n" $(make task-list-ci)
17+ printf "::set-output name=check::%s" $(make task-list-ci)
18+ lint :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Lint Code Base
22+ uses : docker://github/super-linter:v2.2.0
623 composer-install :
724 strategy :
25+ fail-fast : false
826 matrix :
927 php : [7.4]
1028 composer : [lowest, current, highest]
29+ needs : lint
1130 runs-on : ubuntu-latest
1231 container :
13- image : wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10 -dev-root
32+ image : wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12 -dev-root
1433 steps :
1534 - uses : actions/checkout@v1
1635 - name : Cache composer packages
@@ -19,29 +38,44 @@ jobs:
1938 path : ./vendor/
2039 key : ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
2140 - name : Install Dependencies
22- run : composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist
41+ run : composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
2342 if : matrix.composer == 'lowest'
2443 - name : Install Dependencies
25- run : composer install --ansi --no-progress --no-interaction --prefer-dist
44+ run : composer install --ansi --no-progress --no-interaction --prefer-dist -o
2645 if : matrix.composer == 'current'
2746 - name : Install Dependencies
28- run : composer update --ansi --no-progress --no-interaction --prefer-dist
47+ run : composer update --ansi --no-progress --no-interaction --prefer-dist -o
2948 if : matrix.composer == 'highest'
3049 qa :
3150 strategy :
51+ fail-fast : false
3252 matrix :
3353 php : [7.4]
3454 composer : [lowest, current, highest]
35- qa : [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused]
36- needs : composer-install
55+ check : ${{ fromJson(needs.generate-checks-strategy.outputs.check) }}
56+ needs :
57+ - composer-install
58+ - generate-checks-strategy
3759 runs-on : ubuntu-latest
3860 container :
39- image : wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10 -dev-root
61+ image : wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12 -dev-root
4062 steps :
4163 - uses : actions/checkout@v1
4264 - name : Cache composer packages
4365 uses : actions/cache@v1
4466 with :
4567 path : ./vendor/
4668 key : ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
47- - run : make ${{ matrix.qa }}
69+ - name : Install Dependencies
70+ run : (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
71+ if : matrix.composer == 'lowest'
72+ - name : Install Dependencies
73+ run : (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
74+ if : matrix.composer == 'current'
75+ - name : Install Dependencies
76+ run : (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
77+ if : matrix.composer == 'highest'
78+ - name : Fetch Tags
79+ run : git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
80+ if : matrix.check == 'backward-compatibility-check'
81+ - run : make ${{ matrix.check }}
0 commit comments