@@ -2,49 +2,34 @@ name: Build
22
33on :
44 push :
5- paths-ignore :
6- - *.md
5+ paths-ignore : ["*.md"]
76 pull_request :
8- paths-ignore :
9- - *.md
10- branches :
11- - main
7+ paths-ignore : ["*.md"]
8+ branches : [main]
129
1310jobs :
1411 analysis :
15-
16-
1712 runs-on : ubuntu-latest
1813
19-
20-
2114 strategy :
2215 matrix :
23- php : ['8.2', 8.3, '8.3', '8.4']
24-
25-
16+ php : [8.3]
2617
2718 steps :
2819 - uses : actions/checkout@v4
2920
30-
31-
3221 - name : Setup PHP
3322 uses : shivammathur/setup-php@v2
3423 with :
3524 php-version : ${{ matrix.php }}
3625 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
3726 coverage : none
3827
39-
40-
4128 - name : Get Composer Cache Directory
4229 id : composer-cache
4330 run : |
4431 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
4532
46-
47-
4833 - name : Cache composer dependencies
4934 uses : actions/cache@v4
5035 env :
@@ -55,61 +40,42 @@ jobs:
5540 restore-keys : |
5641 php-${{ matrix.php }}-build-${{ env.cache-name }}-
5742
58-
59-
6043 - name : Install composer dependencies
6144 run : composer install --prefer-dist
6245
63-
64-
6546 - name : Run phpstan analysis
6647 run : composer phpstan-analysis
6748
68-
69-
7049 - name : Run phpmd analysis
7150 run : composer phpmd-analysis
7251
7352 test :
7453 name : Test (PHP ${{ matrix.php }})
7554
76-
77- needs :
78- - analysis
79-
55+ needs : [analysis]
8056
8157 runs-on : ubuntu-latest
8258
83-
84-
8559 strategy :
8660 matrix :
87- php : [8.0, 8.1, 8.2]
88-
89-
61+ php : [8.0, 8.1, 8.2, 8.3, 8.4]
9062
9163 steps :
9264 - name : Checkout repository
9365 uses : actions/checkout@v4
9466
95-
96-
9767 - name : Set up PHP
9868 uses : shivammathur/setup-php@v2
9969 with :
10070 php-version : ${{ matrix.php }}
10171 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
10272 coverage : none
10373
104-
105-
10674 - name : Get Composer Cache Directory
10775 id : composer-cache
10876 run : |
10977 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
11078
111-
112-
11379 - name : Cache composer dependencies
11480 uses : actions/cache@v4
11581 env :
@@ -120,75 +86,53 @@ jobs:
12086 restore-keys : |
12187 php-${{ matrix.php }}-build-${{ env.cache-name }}-
12288
123-
124-
12589 - name : Install composer dependencies
12690 run : composer install --no-interaction --prefer-dist
12791
128-
129-
13092 - name : Run PHPUnit tests
13193 run : vendor/bin/phpunit
13294
13395 test-coverage :
13496 name : Test (PHP ${{ matrix.php }})
13597
136-
137- needs :
138- - analysis
139-
98+ needs : [analysis]
14099
141100 runs-on : ubuntu-latest
142101
143-
144-
145102 strategy :
146103 matrix :
147- php : ['8.2', 8.3, '8.3', '8.4']
148-
149-
104+ php : [8.3]
150105
151106 steps :
152107 - name : Checkout repository
153108 uses : actions/checkout@v4
154109
155-
156-
157110 - name : Set up PHP
158111 uses : shivammathur/setup-php@v2
159112 with :
160113 php-version : ${{ matrix.php }}
161114 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
162115
163-
164-
165116 - name : Get Composer Cache Directory
166117 id : composer-cache
167118 run : |
168119 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
169120
170-
171-
172121 - name : Cache composer dependencies
173122 uses : actions/cache@v4
174123 env :
175124 cache-name : laravel-i18n-test
176125 with :
177126 path : ${{ steps.composer-cache.outputs.dir }}
178127 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
179- restore-keys : php-${{ matrix.php }}-build-${{ env.cache-name }}-
180-
181-
128+ restore-keys : |
129+ php-${{ matrix.php }}-build-${{ env.cache-name }}-
182130
183131 - name : Install composer dependencies
184132 run : composer install --no-interaction --prefer-dist
185133
186-
187-
188134 - name : Run PHPUnit tests and generate code coverage
189135 run : vendor/bin/phpunit --coverage-clover=clover.xml
190136
191-
192-
193137 - name : Upload code coverage results
194138 run : bash <(curl -s https://codecov.io/bash)
0 commit comments