@@ -2,102 +2,106 @@ name: Build
22
33on :
44 push :
5- paths-ignore : [' *.md' ]
5+ paths-ignore : [" *.md" ]
66 pull_request :
7- paths-ignore : [' *.md' ]
8- branches : [ master, main ]
7+ paths-ignore : [" *.md" ]
8+ branches : [main]
99
1010jobs :
1111 analysis :
1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- php : [8.2 ]
15+ php : [8.3 ]
1616 steps :
17- - uses : actions/checkout@v2
17+ - uses : actions/checkout@v4
1818 - name : Setup PHP
1919 uses : shivammathur/setup-php@v2
2020 with :
2121 php-version : ${{ matrix.php }}
22- extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
22+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
2323 coverage : none
24+ - name : Get Composer Cache Directory
25+ id : composer-cache
26+ run : |
27+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
2428 - name : Cache composer dependencies
25- uses : actions/cache@v2
29+ uses : actions/cache@v4
2630 env :
2731 cache-name : laravel-gcr-worker-analysis
2832 with :
29- path : ~/ .composer
33+ path : ${{ steps .composer-cache.outputs.dir }}
3034 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
3135 restore-keys : |
3236 php-${{ matrix.php }}-build-${{ env.cache-name }}-
33- php-${{ matrix.php }}-build-
34- php-${{ matrix.php }}-
3537 - name : Install composer dependencies
3638 run : composer install --no-interaction --prefer-dist
3739 - name : Run static analysis
3840 run : composer analyse
3941 test :
4042 name : Test (PHP ${{ matrix.php }})
41- needs : [ analysis ]
43+ needs : [analysis]
4244 runs-on : ubuntu-latest
4345 strategy :
4446 matrix :
45- php : [ 7.4, 8.0, 8.1 ]
47+ php : [8.0, 8.1, 8.2 ]
4648 steps :
4749 - name : Checkout repository
48- uses : actions/checkout@v2
50+ uses : actions/checkout@v4
4951 - name : Set up PHP
5052 uses : shivammathur/setup-php@v2
5153 with :
5254 php-version : ${{ matrix.php }}
53- extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
55+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
5456 coverage : none
57+ - name : Get Composer Cache Directory
58+ id : composer-cache
59+ run : |
60+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
5561 - name : Cache composer dependencies
56- uses : actions/cache@v2
62+ uses : actions/cache@v4
5763 env :
5864 cache-name : laravel-gcr-worker-test
5965 with :
60- path : ~/ .composer
66+ path : ${{ steps .composer-cache.outputs.dir }}
6167 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
6268 restore-keys : |
6369 php-${{ matrix.php }}-build-${{ env.cache-name }}-
64- php-${{ matrix.php }}-build-
65- php-${{ matrix.php }}-
6670 - name : Install composer dependencies
6771 run : composer install --no-interaction --prefer-dist
68- - name : Run PHPUnit tests and generate code coverage
69- run : |
70- vendor/bin/phpunit
72+ - name : Run PHPUnit tests
73+ run : vendor/bin/phpunit
7174 test-coverage :
7275 name : Test (PHP ${{ matrix.php }})
73- needs : [ analysis ]
76+ needs : [analysis]
7477 runs-on : ubuntu-latest
7578 strategy :
7679 matrix :
77- php : [ 8.2 ]
80+ php : [8.3 ]
7881 steps :
7982 - name : Checkout repository
80- uses : actions/checkout@v2
83+ uses : actions/checkout@v4
8184 - name : Set up PHP
8285 uses : shivammathur/setup-php@v2
8386 with :
8487 php-version : ${{ matrix.php }}
85- extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
88+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
89+ - name : Get Composer Cache Directory
90+ id : composer-cache
91+ run : |
92+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8693 - name : Cache composer dependencies
87- uses : actions/cache@v2
94+ uses : actions/cache@v4
8895 env :
8996 cache-name : laravel-gcr-worker-test
9097 with :
91- path : ~/ .composer
98+ path : ${{ steps .composer-cache.outputs.dir }}
9299 key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
93100 restore-keys : |
94101 php-${{ matrix.php }}-build-${{ env.cache-name }}-
95- php-${{ matrix.php }}-build-
96- php-${{ matrix.php }}-
97102 - name : Install composer dependencies
98103 run : composer install --no-interaction --prefer-dist
99104 - name : Run PHPUnit tests and generate code coverage
100- run : |
101- vendor/bin/phpunit --coverage-clover=clover.xml
105+ run : vendor/bin/phpunit --coverage-clover=clover.xml
102106 - name : Upload code coverage results
103107 run : bash <(curl -s https://codecov.io/bash)
0 commit comments