Skip to content

Commit ff08153

Browse files
feat: fix login route not defined, adopt Laravel >= 11 structure (#2636)
1 parent a174ffa commit ff08153

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+872
-1917
lines changed

.github/workflows/frontend.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ jobs:
4040
path: ${{ steps.composer-cache.outputs.dir }}
4141
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
4242
restore-keys: ${{ runner.os }}-composer-
43-
- name: Install Dependencies
43+
- name: Install dependencies
4444
if: steps.git-diff.outputs.diff
4545
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
46-
- uses: actions/setup-node@v4
46+
- name: Set up Node
47+
uses: actions/setup-node@v4
4748
if: steps.git-diff.outputs.diff
4849
with:
4950
node-version-file: ".nvmrc"

.github/workflows/lighthouse.yml

+23-32
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,37 @@ on:
77
branches: [dev, staging, production]
88

99
jobs:
10-
lighthouse-ci:
10+
check-diff:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
php: [8.4]
15-
12+
outputs:
13+
diff: ${{ steps.git-diff.outputs.diff }}
1614
steps:
1715
- uses: actions/checkout@v4
18-
with:
19-
ref: ${{ github.event.pull_request.head.sha }} # https://github.com/GoogleChrome/lighthouse-ci/issues/172
2016
- uses: greguintow/get-diff-action@v7
2117
id: git-diff
2218
with:
23-
patterns: |
19+
PATTERNS: |
2420
composer.json
2521
composer.lock
2622
**/*.php
2723
package.json
2824
package-lock.json
2925
**/*.css
3026
**/*.js"
27+
28+
lighthouse-ci:
29+
runs-on: ubuntu-latest
30+
needs: check-diff
31+
if: ${{ needs.check-diff.outputs.diff != '[]' && needs.check-diff.outputs.diff != '' }}
32+
strategy:
33+
matrix:
34+
php: [8.4]
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
ref: ${{ github.event.pull_request.head.sha }} # https://github.com/GoogleChrome/lighthouse-ci/issues/172
3140
- name: Set up PHP
32-
if: steps.git-diff.outputs.diff
3341
uses: shivammathur/setup-php@v2
3442
with:
3543
php-version: ${{ matrix.php }}
@@ -44,52 +52,35 @@ jobs:
4452
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
4553
restore-keys: ${{ runner.os }}-composer-
4654
- name: Install Dependencies
47-
if: steps.git-diff.outputs.diff
4855
run: composer install -q --no-dev --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
49-
- uses: actions/setup-node@v4
50-
if: steps.git-diff.outputs.diff
56+
- name: Set up Node
57+
uses: actions/setup-node@v4
5158
with:
5259
node-version-file: ".nvmrc"
53-
- name: Cache node modules
54-
if: steps.git-diff.outputs.diff
55-
uses: actions/cache@v4
56-
with:
57-
path: node_modules
58-
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
60+
cache: npm
5961
- name: Install dependencies
60-
if: steps.git-diff.outputs.diff
6162
run: npm install
6263
env:
6364
CI: true
64-
- name: Copy .env
65-
if: steps.git-diff.outputs.diff
66-
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
6765
- name: Create test database
68-
if: steps.git-diff.outputs.diff
6966
run: |
7067
sudo systemctl start mysql.service
7168
mysqladmin create accessibilityexchange --user="root" --password="root"
69+
- name: Copy .env
70+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
7271
- name: Generate keys
73-
if: steps.git-diff.outputs.diff
7472
run: |
7573
echo "CIPHERSWEET_KEY=\"$(openssl rand -hex 32)\"" >> .env
7674
php artisan key:generate
77-
- name: Run database migration
78-
if: steps.git-diff.outputs.diff
75+
- name: Run Laravel Server
7976
run: |
8077
php artisan migrate
8178
php artisan storage:link
8279
php artisan serve &
8380
env:
8481
DB_PASSWORD: root
8582
DB_HOST: localhost
86-
- name: Use Node from .nvmrc file
87-
if: steps.git-diff.outputs.diff
88-
uses: actions/setup-node@v4
89-
with:
90-
node-version-file: ".nvmrc"
9183
- name: Run Lighthouse CI
92-
if: steps.git-diff.outputs.diff
9384
run: |
9485
npm install -g @lhci/[email protected]
9586
lhci autorun

app/Console/Kernel.php

-51
This file was deleted.

app/Exceptions/Handler.php

-38
This file was deleted.

app/Http/Kernel.php

-72
This file was deleted.

app/Http/Middleware/Authenticate.php

-23
This file was deleted.

app/Http/Middleware/EncryptCookies.php

-17
This file was deleted.

app/Http/Middleware/PreventRequestsDuringMaintenance.php

-18
This file was deleted.

app/Http/Middleware/TrimStrings.php

-18
This file was deleted.

app/Http/Middleware/TrustHosts.php

-20
This file was deleted.

0 commit comments

Comments
 (0)