File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,21 @@ jobs:
131
131
composer require protonemedia/laravel-dusk-fakes:^1.6 --dev --with-all-dependencies
132
132
working-directory : ./laravel_app_${{ matrix.php-version }}
133
133
134
+ - name : Set port number based on PHP version
135
+ run : |
136
+ if [[ "${{ matrix.php-version }}" == "8.2" ]]; then
137
+ echo "SERVER_PORT=8000" >> $GITHUB_ENV
138
+ elif [[ "${{ matrix.php-version }}" == "8.3" ]]; then
139
+ echo "SERVER_PORT=8001" >> $GITHUB_ENV
140
+ else
141
+ echo "SERVER_PORT=8002" >> $GITHUB_ENV
142
+ fi
143
+
134
144
- name : Start Chrome Driver and PHP Server
135
145
run : |
136
146
php artisan dusk:chrome-driver --detect &
137
147
./vendor/laravel/dusk/bin/chromedriver-linux &
138
- php artisan serve --port=$((8000 + $ {{ matrix.php-version == '8.2' && 0 || matrix.php-version == '8.3' && 1 || 2 }})) --no-reload &
148
+ php artisan serve --port=${{ env.SERVER_PORT }} --no-reload &
139
149
working-directory : ./laravel_app_${{ matrix.php-version }}
140
150
141
151
- name : Run Tests
@@ -144,7 +154,7 @@ jobs:
144
154
145
155
- name : Run Dusk Tests
146
156
env :
147
- APP_URL : http://127.0.0.1:$((8000 + $ {{ matrix.php-version == '8.2' && 0 || matrix.php-version == '8.3' && 1 || 2 }}))
157
+ APP_URL : " http://127.0.0.1:${{ env.SERVER_PORT }} "
148
158
APP_ENV : testing
149
159
run : php artisan dusk -vvv
150
160
working-directory : ./laravel_app_${{ matrix.php-version }}
You can’t perform that action at this time.
0 commit comments