@@ -2,49 +2,29 @@ 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
18-
19-
20-
2113 strategy :
2214 matrix :
23- php : ['8.2', 8.3, '8.3', '8.4']
24-
25-
26-
15+ php : [8.3]
2716 steps :
2817 - uses : actions/checkout@v4
29-
30-
31-
3218 - name : Setup PHP
3319 uses : shivammathur/setup-php@v2
3420 with :
3521 php-version : ${{ matrix.php }}
3622 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
3723 coverage : none
38-
39-
40-
4124 - name : Get Composer Cache Directory
4225 id : composer-cache
4326 run : |
4427 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
45-
46-
47-
4828 - name : Cache composer dependencies
4929 uses : actions/cache@v4
5030 env :
@@ -54,57 +34,30 @@ jobs:
5434 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
5535 restore-keys : |
5636 php-${{ matrix.php }}-build-${{ env.cache-name }}-
57-
58-
59-
6037 - name : Install composer dependencies
6138 run : composer install --no-interaction --prefer-dist
62-
63-
64-
6539 - name : Run static analysis
6640 run : composer analyse
67-
6841 test :
6942 name : Test (PHP ${{ matrix.php }})
70-
71-
72- needs :
73- - analysis
74-
75-
43+ needs : [analysis]
7644 runs-on : ubuntu-latest
77-
78-
79-
8045 strategy :
8146 matrix :
82- php : [8.0, 8.1, 8.2]
83-
84-
85-
47+ php : [8.0, 8.1, 8.2, 8.3, 8.4]
8648 steps :
8749 - name : Checkout repository
8850 uses : actions/checkout@v4
89-
90-
91-
9251 - name : Set up PHP
9352 uses : shivammathur/setup-php@v2
9453 with :
9554 php-version : ${{ matrix.php }}
9655 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
9756 coverage : none
98-
99-
100-
10157 - name : Get Composer Cache Directory
10258 id : composer-cache
10359 run : |
10460 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
105-
106-
107-
10861 - name : Cache composer dependencies
10962 uses : actions/cache@v4
11063 env :
@@ -114,76 +67,41 @@ jobs:
11467 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
11568 restore-keys : |
11669 php-${{ matrix.php }}-build-${{ env.cache-name }}-
117-
118-
119-
12070 - name : Install composer dependencies
12171 run : composer install --no-interaction --prefer-dist
122-
123-
124-
12572 - name : Run PHPUnit tests
12673 run : vendor/bin/phpunit
127-
12874 test-coverage :
12975 name : Test (PHP ${{ matrix.php }})
130-
131-
132- needs :
133- - analysis
134-
135-
76+ needs : [analysis]
13677 runs-on : ubuntu-latest
137-
138-
139-
14078 strategy :
14179 matrix :
142- php : ['8.2', 8.3, '8.3', '8.4']
143-
144-
145-
80+ php : [8.3]
14681 steps :
14782 - name : Checkout repository
14883 uses : actions/checkout@v4
149-
150-
151-
15284 - name : Set up PHP
15385 uses : shivammathur/setup-php@v2
15486 with :
15587 php-version : ${{ matrix.php }}
15688 extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
157-
158-
159-
16089 - name : Get Composer Cache Directory
16190 id : composer-cache
16291 run : |
16392 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
164-
165-
166-
16793 - name : Cache composer dependencies
16894 uses : actions/cache@v4
16995 env :
17096 cache-name : laravel-gcr-worker-test
17197 with :
17298 path : ${{ steps.composer-cache.outputs.dir }}
17399 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
174- restore-keys : php-${{ matrix.php }}-build-${{ env.cache-name }}-
175-
176-
177-
100+ restore-keys : |
101+ php-${{ matrix.php }}-build-${{ env.cache-name }}-
178102 - name : Install composer dependencies
179103 run : composer install --no-interaction --prefer-dist
180-
181-
182-
183104 - name : Run PHPUnit tests and generate code coverage
184105 run : vendor/bin/phpunit --coverage-clover=clover.xml
185-
186-
187-
188106 - name : Upload code coverage results
189107 run : bash <(curl -s https://codecov.io/bash)
0 commit comments