Skip to content

Commit b41ca0c

Browse files
authored
Merge pull request #1565 from hydephp/2.x-dev
HydePHP v2.x Development
2 parents ad6b2a8 + 0234dfd commit b41ca0c

File tree

377 files changed

+35880
-22898
lines changed

Some content is hidden

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

377 files changed

+35880
-22898
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Compile TypeScript
2+
3+
on:
4+
push:
5+
paths:
6+
- 'packages/**/src/**/*.ts'
7+
8+
jobs:
9+
compile:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0 # Needed for the git commit step
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: |
26+
npm ci
27+
cd packages/vite-plugin && npm ci
28+
cd ../..
29+
30+
- name: Compile TypeScript
31+
run: |
32+
cd packages/vite-plugin
33+
npm run build
34+
cd ../..
35+
36+
- name: Check for changes
37+
id: check_changes
38+
run: |
39+
git diff --exit-code --quiet packages/vite-plugin/dist || echo "changes=true" >> $GITHUB_OUTPUT
40+
41+
- name: Commit changes
42+
if: steps.check_changes.outputs.changes == 'true'
43+
run: |
44+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
45+
git config --local user.name "github-actions[bot]"
46+
git add packages/vite-plugin/dist
47+
git commit -m "Compile TypeScript"
48+
git push

.github/workflows/continuous-integration.yml

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- uses: shivammathur/setup-php@v2
1414
with:
15-
php-version: "8.1"
15+
php-version: "8.2"
1616
extensions: fileinfo
1717

1818
- uses: actions/checkout@v4
@@ -74,7 +74,7 @@ jobs:
7474
fail-fast: false
7575
matrix:
7676
os: [ubuntu-latest, macos-latest, windows-latest]
77-
php: [8.1, 8.2, 8.3]
77+
php: [8.2, 8.3, 8.4]
7878
runs-on: ${{ matrix.os }}
7979

8080
steps:
@@ -109,41 +109,6 @@ jobs:
109109
run: php monorepo/scripts/tests/${{ matrix.script }}.php
110110

111111

112-
build-hydefront-assets:
113-
114-
runs-on: ubuntu-latest
115-
needs: run-smoke-tests
116-
117-
steps:
118-
- uses: actions/checkout@v4
119-
120-
- name: Setup Node.js
121-
uses: actions/setup-node@v4
122-
with:
123-
cache: 'npm'
124-
125-
- name: Install Node.js dependencies
126-
working-directory: 'packages/hydefront'
127-
run: npm ci
128-
129-
- name: Build assets for production
130-
working-directory: 'packages/hydefront'
131-
run: npm run prod
132-
133-
- name: Upload artifacts
134-
uses: actions/upload-artifact@v4
135-
with:
136-
name: 'hydefront'
137-
path: 'packages/hydefront/dist'
138-
139-
- name: Commit changes
140-
uses: EndBug/add-and-commit@v9
141-
with:
142-
add: 'packages/hydefront/dist'
143-
message: 'Compile HydeFront assets for production'
144-
new_branch: compile-hydefront
145-
146-
147112
build-tailwindcss:
148113

149114
runs-on: ubuntu-latest
@@ -164,7 +129,7 @@ jobs:
164129
run: sed -i 's/\.\/vendor\/hyde\/framework\/resources\/views\/\*\*\/\*\.blade\.php/\.\/packages\/framework\/resources\/views\/\*\*\/\*\.blade\.php/' tailwind.config.js
165130

166131
- name: Build assets for production
167-
run: npm run prod
132+
run: npm run build
168133

169134
- name: Copy compiled app.css file to HydeFront dist folder
170135
run: cp _media/app.css packages/hydefront/dist/app.css
@@ -196,7 +161,7 @@ jobs:
196161
steps:
197162
- uses: shivammathur/setup-php@v2
198163
with:
199-
php-version: "8.1"
164+
php-version: "8.2"
200165
coverage: xdebug
201166
extensions: fileinfo
202167
- uses: actions/checkout@v4
@@ -290,7 +255,7 @@ jobs:
290255
- uses: actions/checkout@v4
291256
- uses: shivammathur/setup-php@v2
292257
with:
293-
php-version: "8.1"
258+
php-version: "8.2"
294259

295260
- name: Cache Composer packages
296261
id: composer-cache
@@ -332,7 +297,7 @@ jobs:
332297
- uses: actions/checkout@v4
333298
- uses: shivammathur/setup-php@v2
334299
with:
335-
php-version: "8.1"
300+
php-version: "8.2"
336301

337302
- name: Cache Composer packages
338303
id: composer-cache
@@ -377,7 +342,7 @@ jobs:
377342
- uses: actions/checkout@v4
378343
- uses: shivammathur/setup-php@v2
379344
with:
380-
php-version: "8.1"
345+
php-version: "8.2"
381346

382347
- name: Cache Composer packages
383348
id: composer-cache
@@ -544,7 +509,7 @@ jobs:
544509
steps:
545510
- uses: shivammathur/setup-php@v2
546511
with:
547-
php-version: "8.1"
512+
php-version: "8.2"
548513
- uses: actions/checkout@v4
549514

550515
- name: Download static analysis tools
@@ -564,7 +529,7 @@ jobs:
564529
steps:
565530
- uses: shivammathur/setup-php@v2
566531
with:
567-
php-version: "8.1"
532+
php-version: "8.2"
568533
- uses: actions/checkout@v4
569534

570535
- name: Install Composer Dependencies
@@ -582,7 +547,7 @@ jobs:
582547
steps:
583548
- uses: shivammathur/setup-php@v2
584549
with:
585-
php-version: "8.1"
550+
php-version: "8.2"
586551
- uses: actions/checkout@v4
587552

588553
- name: Install Composer Dependencies

.github/workflows/coverage-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: shivammathur/setup-php@v2
1111
with:
12-
php-version: "8.1"
12+
php-version: "8.2"
1313
coverage: xdebug
1414
extensions: fileinfo
1515
- uses: actions/checkout@v4

.github/workflows/end-to-end-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: vendor/bin/pest --stop-on-failure
3434

3535
- name: Prepare the Environment
36-
run: echo -e "APP_URL=http://localhost:8080 \nDUSK_ENABLED=true\nSERVER_DASHBOARD=false" > .env
36+
run: echo -e "APP_URL=http://localhost:8080 \nDUSK_ENABLED=true\nSERVER_DASHBOARD=false\nSERVER_SAVE_PREVIEW=true" > .env
3737

3838
- name: Upgrade Chrome Driver
3939
run: php hyde dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`

.github/workflows/matrix-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Matrix Tests
22

33
on:
44
pull_request:
5-
branches: [ "master" ]
5+
branches: [ "master", "2.x-dev" ]
66
paths:
77
- 'app/**'
88
- 'packages/**'
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest, windows-latest, macos-latest]
22-
php: [8.1, 8.2, 8.3]
22+
php: [8.2, 8.3, 8.4]
2323
runs-on: ${{ matrix.os }}
2424

2525
steps:

.github/workflows/split-monorepo.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,53 @@ jobs:
390390
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
391391
392392
git push upstream master
393+
394+
vite-plugin:
395+
runs-on: ubuntu-latest
396+
continue-on-error: true
397+
environment:
398+
name: hydephp/vite-plugin
399+
url: https://github.com/hydephp/vite-plugin/tree/master
400+
401+
steps:
402+
- name: Checkout hydephp/develop
403+
uses: actions/checkout@v4
404+
with:
405+
path: develop
406+
persist-credentials: false
407+
408+
- name: Checkout hydephp/vite-plugin
409+
uses: actions/checkout@v4
410+
with:
411+
repository: hydephp/vite-plugin
412+
path: vite-plugin
413+
ref: master
414+
fetch-depth: 0
415+
persist-credentials: false
416+
417+
- name: Empty the destination directory
418+
run: rm -rf vite-plugin/*
419+
420+
- name: Copy over files
421+
run: cp -rf develop/packages/vite-plugin/. vite-plugin -v
422+
423+
- name: Commit and push changes
424+
env:
425+
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
426+
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
427+
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
428+
run: |
429+
cd vite-plugin
430+
if ! [[ `git status --porcelain` ]]; then
431+
echo "No changes to this package. Exiting gracefully.";
432+
exit 0;
433+
fi
434+
435+
git config user.name "github-actions[bot]"
436+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
437+
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/vite-plugin.git
438+
439+
git add .
440+
git commit --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}"
441+
442+
git push upstream master

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 🔎 Static Analysis
22

33
on:
44
pull_request:
5-
branches: [ "master" ]
5+
branches: [ "master", "2.x-dev" ]
66

77
jobs:
88

.idea/develop.iml

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpunit.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)