Skip to content

Commit 87beda6

Browse files
committed
Sync back with subpackage
1 parent 6df11e2 commit 87beda6

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

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

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,46 +26,41 @@ jobs:
2626

2727
- name: Install Hyde
2828
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
29+
run: git clone -b master https://github.com/hydephp/develop.git --depth 1 runner
3530

36-
- name: Copy over framework source code
31+
- name: Copy over framework code
3732
shell: bash
3833
run: |
39-
mkdir -p ./hyde/packages/hyde/framework/src
34+
rm -rf ./runner/packages/framework/src
35+
rm -rf ./runner/packages/framework/tests
36+
mkdir -p ./runner/packages/framework/src
37+
mkdir -p ./runner/packages/framework/tests
4038
41-
# Since we can't use rsync on Windows, we need to copy the files to a temporary directory and then copy them back
4239
if [ "${{ matrix.os }}" == "windows-latest" ]; then
40+
# For Windows, copy to temp then back to preserve structure
4341
mkdir ../temp
4442
cp -r ./ ../temp
45-
rm -rf ../temp/hyde
46-
cp -r ../temp/. ./hyde/packages/hyde/framework/src
43+
rm -rf ../temp/runner
44+
cp -r ../temp/src/. ./runner/packages/framework/src
45+
cp -r ../temp/tests/. ./runner/packages/framework/tests
4746
else
48-
rsync -a --exclude=hyde ./. ./hyde/packages/hyde/framework/src
47+
# For Unix systems, use rsync
48+
rsync -a --exclude=runner ./src/. ./runner/packages/framework/src
49+
rsync -a --exclude=runner ./tests/. ./runner/packages/framework/tests
4950
fi
5051
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
56-
57-
- name: Download test runner configuration
58-
run: cd hyde && curl https://raw.githubusercontent.com/hydephp/develop/master/packages/hyde/phpunit.xml.dist -o phpunit.xml.dist
52+
- name: Install dependencies
53+
run: cd runner && composer install
5954

6055
- name: Set environment to testing
61-
run: cd hyde && echo "ENV=testing" > .env
56+
run: cd runner && echo "ENV=testing" > .env
6257
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
63-
run: cd hyde && vendor/bin/pest --log-junit report.xml
58+
run: cd runner && vendor/bin/pest --log-junit report.xml
6459
env:
6560
ENV: testing
6661

6762
- name: Ping statistics server with test results
6863
run: |
69-
cd hyde
64+
cd runner
7065
curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
7166
php ping.php "Framework CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }}

0 commit comments

Comments
 (0)