1212 description : ' テストするPHPバージョン'
1313 required : true
1414 options :
15- - ' 7.3'
16- - ' 7.4'
1715 - ' 8.0'
1816 - ' 8.1'
1917 - ' 8.2'
20- default : ' 7.4 '
18+ default : ' 8.0 '
2119 # is_output_manual:
2220 # type: boolean
2321 # description: 'マニュアル出力'
2422 # default: 'false'
2523env :
2624 # schedule用
27- PHP_VERSION_DEFAULT : ' 7.4 '
25+ PHP_VERSION_DEFAULT : ' 8.0 '
2826 # IS_OUTPUT_MANUAL_DEFAULT: 'false'
2927
3028jobs :
@@ -85,14 +83,14 @@ jobs:
8583 run : |
8684 mysql --user="root" --password="root" -e "SELECT user, host, plugin FROM mysql.user;"
8785
88- - name : PHP 7.3 changes database user authentication method
89- run : |
90- if [[ "$PHP_VERSION" = "7.3" ]]; then
91- mysql --user="root" --password="root" -e "alter user 'root'@'localhost' identified with mysql_native_password by 'root';"
92- mysql --user="root" --password="root" -e "SELECT user, host, plugin FROM mysql.user;"
93- fi
94- env :
95- PHP_VERSION : ${{ env.PHP_VERSION }}
86+ # - name: PHP 7.3 changes database user authentication method
87+ # run: |
88+ # if [[ "$PHP_VERSION" = "7.3" ]]; then
89+ # mysql --user="root" --password="root" -e "alter user 'root'@'localhost' identified with mysql_native_password by 'root';"
90+ # mysql --user="root" --password="root" -e "SELECT user, host, plugin FROM mysql.user;"
91+ # fi
92+ # env:
93+ # PHP_VERSION: ${{ env.PHP_VERSION }}
9694
9795 # Composer
9896 - name : Validate composer.json and composer.lock
@@ -134,9 +132,21 @@ jobs:
134132 - name : Chrome Version
135133 run : /opt/google/chrome/chrome --version
136134
137- # https://readouble.com/laravel/8.x/ja/dusk.html#managing-chromedriver-installations
138- # - name: Upgrade Chrome Driver
139- # run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
135+ # https://readouble.com/laravel/9.x/ja/dusk.html#managing-chromedriver-installations
136+ # https://readouble.com/laravel/9.x/ja/dusk.html#running-tests-on-github-actions
137+ # Chrome Version と Chrome Driverを同じにする
138+ - name : Upgrade Chrome Driver
139+ # run: php artisan dusk:chrome-driver --detect
140+ # run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
141+ run : php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3`
142+
143+ - name : Chrome Driver Copy
144+ run : sudo \cp -f ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver ./vendor/laravel/dusk/bin/chromedriver-linux
145+
146+ - name : Chrome Driver Permission Denied 対応
147+ run : |
148+ sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver
149+ sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
140150
141151 # https://stackoverflow.com/questions/76980975/chrome-driver-failing-in-laravel-dusk-failed-to-open-stream-http-request-fai
142152 # https://voicetechno-jp.secure-web.jp/ChromeDriverV115orNewer.html
@@ -152,25 +162,6 @@ jobs:
152162 # - name: Downgrade Chrome driver to v114
153163 # run: php artisan dusk:chrome-driver 114
154164
155- - name : Set env CHROME_VERSION
156- run : |
157- echo CHROME_VERSION=`/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1` >> $GITHUB_ENV
158-
159- # https://github.com/browser-actions/setup-chrome (community)
160- - name : Download Chrome and Chrome Driver(use Chrome Driver Only)
161- uses : browser-actions/setup-chrome@v1
162- id : setup-chrome
163- with :
164- chrome-version : ${{ env.CHROME_VERSION }}
165- install-chromedriver : true
166-
167- - name : Chrome Driver Copy
168- run : sudo \cp -f ${{ steps.setup-chrome.outputs.chromedriver-path }} ./vendor/laravel/dusk/bin/chromedriver-linux
169-
170- - name : Chrome Driver Permission Denied 対応
171- run : |
172- sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
173-
174165 - name : Start Chrome Driver
175166 run : ./vendor/laravel/dusk/bin/chromedriver-linux --port=9515 &
176167
0 commit comments