Skip to content

Commit db72e60

Browse files
authored
Merge pull request #1765 from hydephp/sync-packages
Internal: Sync changes from downstream packages into the monorepo
2 parents b184c68 + 49c96c8 commit db72e60

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

packages/framework/.github/workflows/run-tests.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Framework Tests (Matrix)
2+
23
on:
34
push:
45
branches: ["master", "develop"]
56
pull_request:
67
branches: ["master", "develop"]
8+
merge_group:
79

810
jobs:
911

@@ -22,31 +24,35 @@ jobs:
2224
php-version: ${{ matrix.php }}
2325
extensions: fileinfo, zip
2426

25-
- name: Echo GitHub ref
26-
run: echo ${{ github.ref }}
27-
28-
- name: Install Hyde (master)
29-
if: "github.ref == 'refs/heads/master'"
30-
run: git clone -b master https://github.com/hydephp/hyde.git
31-
32-
- name: Install Hyde (develop)
33-
if: "github.ref != 'refs/heads/master'"
34-
run: git clone -b develop https://github.com/hydephp/hyde.git
35-
36-
- name: Require latest framework version
37-
if: "github.ref == 'refs/heads/master'"
38-
run: cd hyde && composer require hyde/framework:dev-master hyde/testing:dev-master
27+
- name: Install Hyde
28+
shell: bash
29+
run: |
30+
if [ "${{ github.ref }}" == "refs/heads/master" ]; then
31+
git clone -b master https://github.com/hydephp/hyde.git
32+
else
33+
git clone -b develop https://github.com/hydephp/hyde.git
34+
fi
3935
40-
- name: Require latest development framework version
41-
if: "github.ref == 'refs/heads/develop'"
42-
run: cd hyde && composer require hyde/framework:dev-develop hyde/testing:dev-master
36+
- name: Copy over framework source code
37+
shell: bash
38+
run: |
39+
mkdir -p ./hyde/packages/hyde/framework/src
4340
44-
- name: Require pull request framework version
45-
if: "github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"
46-
run: cd hyde && composer require hyde/framework:dev-${{ github.head_ref }} hyde/testing:dev-master
41+
# Since we can't use rsync on Windows, we need to copy the files to a temporary directory and then copy them back
42+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
43+
mkdir ../temp
44+
cp -r ./ ../temp
45+
rm -rf ../temp/hyde
46+
cp -r ../temp/. ./hyde/packages/hyde/framework/src
47+
else
48+
rsync -a --exclude=hyde ./. ./hyde/packages/hyde/framework/src
49+
fi
4750
48-
- name: Copy over test files
49-
run: cp -r ./tests/. ./hyde/tests
51+
- name: Update composer.json to load framework from local source
52+
run: |
53+
cd hyde
54+
composer config repositories.framework path ./packages/hyde/framework
55+
composer require hyde/testing:dev-master hyde/framework:dev-develop
5056
5157
- name: Download test runner configuration
5258
run: cd hyde && curl https://raw.githubusercontent.com/hydephp/develop/master/packages/hyde/phpunit.xml.dist -o phpunit.xml.dist

packages/hyde/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"require": {
2727
"php": "^8.1",
28-
"hyde/framework": "^1.5",
28+
"hyde/framework": "^1.6",
2929
"laravel-zero/framework": "^10.0"
3030
},
3131
"require-dev": {

0 commit comments

Comments
 (0)