11name : Continuous Integration
22
33on :
4+ push :
5+ branches :
6+ - ' *.x'
47 pull_request :
58 branches :
69 - ' *.x'
1013 - ' chore/**'
1114 - ' story/**'
1215 types : [opened, reopened, synchronize, ready_for_review]
16+ workflow_dispatch :
1317
1418concurrency :
1519 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -20,68 +24,18 @@ permissions: {}
2024jobs :
2125 setup :
2226 name : Setup PHP
23- runs-on : ubuntu-latest
2427 if : ${{ !github.event.pull_request.draft }}
25- timeout-minutes : 5
2628 permissions :
2729 contents : read
28- outputs :
29- CACHE_KEY : ${{ steps.cache.outputs.key }}
30- PHP_VERSION : ${{ steps.setup.outputs.PHP_VERSION }}
31- PHP_EXTENSIONS : ${{ steps.setup.outputs.PHP_EXTENSIONS }}
32- PHP_INI_PROPERTIES : ${{ steps.setup.outputs.PHP_INI_PROPERTIES }}
33- COMPOSER_FLAGS : ${{ steps.setup.outputs.COMPOSER_FLAGS }}
34- steps :
35- - name : Checkout code
36- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37- with :
38- fetch-depth : 0
39- persist-credentials : false
40-
41- - name : Setup job outputs
42- id : setup
43- run : |
44- echo "PHP_VERSION=8.4" >> "$GITHUB_OUTPUT"
45- echo "PHP_EXTENSIONS=mbstring,pdo,pdo_pgsql,xml,ctype,fileinfo,json,curl,openssl,dom,zip" >> "$GITHUB_OUTPUT"
46- echo "PHP_INI_PROPERTIES=post_max_size=256M,upload_max_filesize=256M" >> "$GITHUB_OUTPUT"
47- echo "COMPOSER_FLAGS=--prefer-dist --optimize-autoloader" >> "$GITHUB_OUTPUT"
48-
49- - name : Create cache key
50- id : cache
51- shell : bash
52- env :
53- RUNNER_OS : ${{ runner.os }}
54- RUNNER_ARCH : ${{ runner.arch }}
55- HASHED_COMPOSER_LOCK : ${{ hashFiles('composer.lock') }}
56- run : |
57- composer_hash=${HASHED_COMPOSER_LOCK}
58- os_lower=$(echo ${RUNNER_OS} | tr '[:upper:]' '[:lower:]')
59- arch_lower=$(echo ${RUNNER_ARCH} | tr '[:upper:]' '[:lower:]')
60- combined_key="${os_lower}-${arch_lower}-composer-${composer_hash}"
61- echo "key=${combined_key}" >> "$GITHUB_OUTPUT"
62-
63- - name : Setup PHP
64- uses : shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
65- with :
66- php-version : ${{ steps.setup.outputs.PHP_VERSION }}
67- extensions : ${{ steps.setup.outputs.PHP_EXTENSIONS }}
68- ini-values : ${{ steps.setup.outputs.PHP_INI_PROPERTIES }}
69- coverage : xdebug
70- tools : composer:v2
71-
72- - name : Install composer dependencies
73- uses : ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
74- with :
75- composer-options : ${{ steps.setup.outputs.COMPOSER_FLAGS }}
76- custom-cache-key : ${{ steps.cache.outputs.key }}
30+ uses : $/.github/workflows/_setup.yml
7731
7832 pint :
7933 name : Perform Pint format
8034 needs : [setup]
8135 if : ${{ !github.event.pull_request.draft }}
8236 permissions :
8337 contents : read
84- uses : . /.github/workflows/_pint.yml
38+ uses : $ /.github/workflows/_pint.yml
8539 with :
8640 CACHE_KEY : ${{ needs.setup.outputs.CACHE_KEY }}
8741 COMPOSER_FLAGS : ${{ needs.setup.outputs.COMPOSER_FLAGS }}
9549 if : ${{ !github.event.pull_request.draft }}
9650 permissions :
9751 contents : read
98- uses : . /.github/workflows/_rector.yml
52+ uses : $ /.github/workflows/_rector.yml
9953 with :
10054 CACHE_KEY : ${{ needs.setup.outputs.CACHE_KEY }}
10155 COMPOSER_FLAGS : ${{ needs.setup.outputs.COMPOSER_FLAGS }}
10963 if : ${{ !github.event.pull_request.draft }}
11064 permissions :
11165 contents : read
112- uses : . /.github/workflows/_phpstan.yml
66+ uses : $ /.github/workflows/_phpstan.yml
11367 with :
11468 CACHE_KEY : ${{ needs.setup.outputs.CACHE_KEY }}
11569 COMPOSER_FLAGS : ${{ needs.setup.outputs.COMPOSER_FLAGS }}
12377 if : ${{ !github.event.pull_request.draft }}
12478 permissions :
12579 contents : read
126- uses : . /.github/workflows/_pest.yml
80+ uses : $ /.github/workflows/_pest.yml
12781 with :
12882 CACHE_KEY : ${{ needs.setup.outputs.CACHE_KEY }}
12983 COMPOSER_FLAGS : ${{ needs.setup.outputs.COMPOSER_FLAGS }}
13589 name : CI Gate
13690 needs : [setup, pint, rector, phpstan, pest]
13791 if : ${{ always() && !github.event.pull_request.draft }}
138- runs-on : ubuntu-latest
92+ runs-on : ubuntu-slim
13993 timeout-minutes : 5
14094 permissions : {}
14195 steps :
0 commit comments