From 73f0271a07c8cc05bf9756ac29ba390be28befc7 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:09:30 +0200 Subject: [PATCH 01/13] Update workflows to handle running in forks Fixes issues when these secrets are not set, for example when running from a fork. Instead, these steps will now be skipped. --- .github/workflows/smoke-tests.yml | 5 +++-- .github/workflows/static-analysis.yml | 2 +- .github/workflows/test-pull-requests.yml | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index de338347c6c..03b6617147a 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -31,7 +31,7 @@ jobs: run: vendor/bin/pest --stop-on-failure --log-junit report.xml - name: Ping continuous integration server with test status - if: always() && github.event.repository.full_name == 'hydephp/develop' + if: always() && github.event.repository.full_name == 'hydephp/develop' && secrets.CI_SERVER_TOKEN run: | bearerToken="${{ secrets.CI_SERVER_TOKEN }}" commit="${{ github.event.pull_request.head.sha }}" @@ -51,6 +51,7 @@ jobs: https://ci.hydephp.com/api/test-run-reports - name: Ping statistics server with test results + if: secrets.OPENANALYTICS_TOKEN run: | curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} @@ -88,9 +89,9 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - name: Ping statistics server with test results + if: secrets.OPENANALYTICS_TOKEN run: | curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index dba99d85384..9fb735c6a01 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -25,7 +25,7 @@ jobs: # Send the reports to the CI server to calculate type coverage and send back commit status checks - name: Ping CI server with type coverage results - if: github.event.repository.full_name == 'hydephp/develop' + if: github.event.repository.full_name == 'hydephp/develop' && secrets.CI_SERVER_TOKEN run: php monorepo/scripts/ping-ci-server-with-type-coverage.php ${{ secrets.CI_SERVER_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.head_ref }} ${{ github.run_id }} type-coverage: diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index f8862b49b1a..b440a178b37 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -49,6 +49,7 @@ jobs: files: ./build/coverage/clover.xml,./build/coverage/crap4j.xml,./build/coverage/report.txt,./build/junit.xml - name: Ping statistics server with test results + if: secrets.OPENANALYTICS_TOKEN run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php @@ -76,6 +77,7 @@ jobs: run: vendor/bin/pest --log-junit report.xml - name: Ping statistics server with test results + if: secrets.OPENANALYTICS_TOKEN run: | curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} From 571f1a79e4e501566ee5b537a20b3617c1c17851 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:22:24 +0200 Subject: [PATCH 02/13] Revert "Update workflows to handle running in forks" This reverts commit 73f0271a07c8cc05bf9756ac29ba390be28befc7 as this syntax is not supported. See https://stackoverflow.com/a/72926257/5700388 --- .github/workflows/smoke-tests.yml | 5 ++--- .github/workflows/static-analysis.yml | 2 +- .github/workflows/test-pull-requests.yml | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 03b6617147a..de338347c6c 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -31,7 +31,7 @@ jobs: run: vendor/bin/pest --stop-on-failure --log-junit report.xml - name: Ping continuous integration server with test status - if: always() && github.event.repository.full_name == 'hydephp/develop' && secrets.CI_SERVER_TOKEN + if: always() && github.event.repository.full_name == 'hydephp/develop' run: | bearerToken="${{ secrets.CI_SERVER_TOKEN }}" commit="${{ github.event.pull_request.head.sha }}" @@ -51,7 +51,6 @@ jobs: https://ci.hydephp.com/api/test-run-reports - name: Ping statistics server with test results - if: secrets.OPENANALYTICS_TOKEN run: | curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} @@ -89,9 +88,9 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true - name: Ping statistics server with test results - if: secrets.OPENANALYTICS_TOKEN run: | curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 9fb735c6a01..dba99d85384 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -25,7 +25,7 @@ jobs: # Send the reports to the CI server to calculate type coverage and send back commit status checks - name: Ping CI server with type coverage results - if: github.event.repository.full_name == 'hydephp/develop' && secrets.CI_SERVER_TOKEN + if: github.event.repository.full_name == 'hydephp/develop' run: php monorepo/scripts/ping-ci-server-with-type-coverage.php ${{ secrets.CI_SERVER_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.head_ref }} ${{ github.run_id }} type-coverage: diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index b440a178b37..f8862b49b1a 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -49,7 +49,6 @@ jobs: files: ./build/coverage/clover.xml,./build/coverage/crap4j.xml,./build/coverage/report.txt,./build/junit.xml - name: Ping statistics server with test results - if: secrets.OPENANALYTICS_TOKEN run: | cp build/junit.xml report.xml curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php @@ -77,7 +76,6 @@ jobs: run: vendor/bin/pest --log-junit report.xml - name: Ping statistics server with test results - if: secrets.OPENANALYTICS_TOKEN run: | curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} From 21da57dc4a23989a291c7779594904dd0910f3b0 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:23:05 +0200 Subject: [PATCH 03/13] Don't fail Codecov on errors As it can fail if it is in a fork --- .github/workflows/smoke-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index de338347c6c..cccd8768abf 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -88,7 +88,6 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - name: Ping statistics server with test results run: | From 4e309442218d0b0171fc3ef67a0da9ed091a47d2 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:33:09 +0200 Subject: [PATCH 04/13] Update workflows to better handle running in forks --- .github/workflows/smoke-tests.yml | 6 ++++++ monorepo/scripts/ping-ci-server-with-type-coverage.php | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index cccd8768abf..69dc4413893 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -37,6 +37,12 @@ jobs: commit="${{ github.event.pull_request.head.sha }}" url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + # If bearerToken is not set, we we exit early as we are probably running on a fork + if [ -z "$bearerToken" ]; then + echo "Exiting early as bearerToken is not set" + exit 0 + fi + if [ ${{ steps.smoke-tests.outcome }} == "failure" ]; then status=false else diff --git a/monorepo/scripts/ping-ci-server-with-type-coverage.php b/monorepo/scripts/ping-ci-server-with-type-coverage.php index e30f001490f..4e447db2af0 100644 --- a/monorepo/scripts/ping-ci-server-with-type-coverage.php +++ b/monorepo/scripts/ping-ci-server-with-type-coverage.php @@ -49,7 +49,10 @@ curl_close($curl); var_dump($resp); -if (curl_getinfo($curl, CURLINFO_HTTP_CODE) !== 200) { +// if curl has 401 it's probably as it was run in a fork so that's fine, but if it's another error 400 or above we should fail the build +$code = curl_getinfo($curl, CURLINFO_HTTP_CODE); +if ($code >= 400 && $code !== 401) { + echo "::warning:: Failed to send type report to statistics server with code $code\n"; echo 'Type coverage report failed to send'; - exit(curl_getinfo($curl, CURLINFO_HTTP_CODE)); + // exit($code); } From cca469e690ce692290854e660409ed112bbb849b Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:33:38 +0200 Subject: [PATCH 05/13] Test commands descriptions follow naming conventions --- .../EnsureCodeFollowsNamingConventionTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php index bd59ea62ab8..4ec0157f2f0 100644 --- a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php +++ b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php @@ -28,6 +28,23 @@ public function testCommandsClassesFollowNamingConventions() } } + public function testCommandsDescriptionsFollowNamingConventions() + { + $files = glob('vendor/hyde/framework/src/Console/Commands/*.php'); + + $this->assertNotEmpty($files, 'No commands found.'); + + // Commands must have a string $description property + foreach ($files as $filepath) { + $class = 'Hyde\\Console\\Commands\\'.basename($filepath, '.php'); + $reflection = new ReflectionClass($class); + + $this->assertTrue($reflection->hasProperty('description') && $reflection->getProperty('description')->isProtected(), + "Command class $class does not have a protected \$description property.\n ".realpath($filepath) + ); + } + } + public function testActionEntryPointsFollowNamingConventions() { $files = glob('vendor/hyde/framework/src/Framework/Actions/*.php'); From 09385392753ad11ca5d0478e1bdceb002291ab46 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:38:13 +0200 Subject: [PATCH 06/13] Run assertions on the descriptions --- .../EnsureCodeFollowsNamingConventionTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php index 4ec0157f2f0..6dd86a930e8 100644 --- a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php +++ b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php @@ -4,7 +4,9 @@ namespace Hyde\Framework\Testing\Unit; +use Illuminate\Filesystem\Filesystem; use Hyde\Framework\Actions\BladeMatterParser; +use Hyde\Console\Commands\VendorPublishCommand; use Hyde\Framework\Actions\CreatesNewMarkdownPostFile; use Hyde\Framework\Actions\CreatesNewPageSourceFile; use Hyde\Framework\Actions\MarkdownFileParser; @@ -30,6 +32,8 @@ public function testCommandsClassesFollowNamingConventions() public function testCommandsDescriptionsFollowNamingConventions() { + self::mockConfig(); + $files = glob('vendor/hyde/framework/src/Console/Commands/*.php'); $this->assertNotEmpty($files, 'No commands found.'); @@ -42,6 +46,18 @@ public function testCommandsDescriptionsFollowNamingConventions() $this->assertTrue($reflection->hasProperty('description') && $reflection->getProperty('description')->isProtected(), "Command class $class does not have a protected \$description property.\n ".realpath($filepath) ); + + if ($class === VendorPublishCommand::class) { + $params = [new Filesystem()]; + } else { + $params = []; + } + + $instance = new $class(...$params); + $description = $reflection->getProperty('description')->getValue($instance); + + $this->assertIsString($description); + $this->assertNotEmpty($description); } } From 092e7ff55c7ee7e253b8dac212b1c3e0b8359fe7 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:38:36 +0200 Subject: [PATCH 07/13] Get description using accessor instead of reflection --- .../tests/Unit/EnsureCodeFollowsNamingConventionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php index 6dd86a930e8..d1a10aad6b4 100644 --- a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php +++ b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php @@ -54,7 +54,7 @@ public function testCommandsDescriptionsFollowNamingConventions() } $instance = new $class(...$params); - $description = $reflection->getProperty('description')->getValue($instance); + $description = $instance->getDescription(); $this->assertIsString($description); $this->assertNotEmpty($description); From cd5651f3e8315993fb5779624ad457ab5954f783 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:39:33 +0000 Subject: [PATCH 08/13] Bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/continuous-integration.yml | 2 +- .github/workflows/test-pull-requests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6fe765a78bb..f606a05cc4c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -223,7 +223,7 @@ jobs: env: ENV: testing - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: files: ./build/coverage/clover.xml,./build/coverage/crap4j.xml,./build/coverage/report.txt,./build/junit.xml fail_ci_if_error: false # optional (default = false) diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index f8862b49b1a..53b743f6863 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -44,7 +44,7 @@ jobs: env: ENV: testing - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: files: ./build/coverage/clover.xml,./build/coverage/crap4j.xml,./build/coverage/report.txt,./build/junit.xml From 70e31326c18439bca075a091fa30500d51d7cce4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:44:59 +0000 Subject: [PATCH 09/13] Bump actions/download-artifact from 2 to 4 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/continuous-integration.yml | 10 +++++----- .github/workflows/end-to-end-testing.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f606a05cc4c..80299ee14a8 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -449,31 +449,31 @@ jobs: rm -rf master/test-fixtures && mkdir master/test-fixtures - name: Download coverage report artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: html-coverage path: master/coverage - name: Download upcoming documentation artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dev-docs path: master/dev-docs - name: Download API documentation artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: api-documentation path: master/api-docs - name: Download preview site artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: site-preview path: master/preview - name: Download test fixture docs artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: test-fixture-docs path: master/test-fixtures/docs diff --git a/.github/workflows/end-to-end-testing.yml b/.github/workflows/end-to-end-testing.yml index 5904b2ab81e..7835cd1b9a5 100644 --- a/.github/workflows/end-to-end-testing.yml +++ b/.github/workflows/end-to-end-testing.yml @@ -80,13 +80,13 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'run-visual-tests') || github.event_name == 'push' steps: - name: Download Dusk generated pages - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: dusk-source path: _site - name: Download app.css - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: app.css path: _site/media From 3378926c26e46f5823d070a8dbf2f537247c0341 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 25 Apr 2024 16:49:28 +0200 Subject: [PATCH 10/13] Assert the descriptions follow naming conventions --- .../EnsureCodeFollowsNamingConventionTest.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php index d1a10aad6b4..8f9a638f2c4 100644 --- a/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php +++ b/packages/framework/tests/Unit/EnsureCodeFollowsNamingConventionTest.php @@ -58,6 +58,26 @@ public function testCommandsDescriptionsFollowNamingConventions() $this->assertIsString($description); $this->assertNotEmpty($description); + + $this->assertTrue($description[0] === strtoupper($description[0]), + "Command class $class description does not start with an uppercase letter.\n ".realpath($filepath) + ); + + $this->assertTrue($description[strlen($description) - 1] !== '.' && $description[strlen($description) - 1] !== '!' && $description[strlen($description) - 1] !== '?', + "Command class $class description ends with a period or another punctuation mark.\n ".realpath($filepath) + ); + + $this->assertSame($description, trim($description), + 'Command class '.$class.' description has leading or trailing whitespace.' + ); + + $this->assertStringNotContainsString(' ', $description, + 'Command class '.$class.' description has multiple consecutive spaces.' + ); + + $this->assertStringNotContainsString("\n", $description, + 'Command class '.$class.' description has a newline character.' + ); } } From a40cdf8de658bb430cc0f37930466da10b5979f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:51:17 +0000 Subject: [PATCH 11/13] Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/continuous-integration.yml | 10 +++++----- .github/workflows/deploy-documentation-preview.yml | 2 +- .github/workflows/end-to-end-testing.yml | 2 +- .github/workflows/smoke-tests.yml | 4 ++-- .github/workflows/test-pull-requests.yml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 80299ee14a8..7b3eb6b778c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -22,7 +22,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} @@ -202,7 +202,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} @@ -293,7 +293,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} @@ -341,7 +341,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} @@ -392,7 +392,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/deploy-documentation-preview.yml b/.github/workflows/deploy-documentation-preview.yml index fbc56fd2c15..38cb84284a4 100644 --- a/.github/workflows/deploy-documentation-preview.yml +++ b/.github/workflows/deploy-documentation-preview.yml @@ -23,7 +23,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/end-to-end-testing.yml b/.github/workflows/end-to-end-testing.yml index 7835cd1b9a5..33aae369fcc 100644 --- a/.github/workflows/end-to-end-testing.yml +++ b/.github/workflows/end-to-end-testing.yml @@ -16,7 +16,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 69dc4413893..94abd54126a 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -16,7 +16,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} @@ -74,7 +74,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 53b743f6863..251d6768d07 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -23,7 +23,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} From 7f02a6836b314e0a41695802373605c3e07119cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:36:52 +0000 Subject: [PATCH 12/13] Bump actions/checkout from 2 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/continuous-integration.yml | 36 +++++++++---------- .../deploy-documentation-preview.yml | 2 +- .github/workflows/end-to-end-testing.yml | 2 +- .github/workflows/hyde-stan.yml | 2 +- .github/workflows/smoke-tests.yml | 4 +-- .github/workflows/split-monorepo.yml | 28 +++++++-------- .github/workflows/static-analysis.yml | 4 +-- .github/workflows/test-pull-requests.yml | 4 +-- 8 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7b3eb6b778c..eb5e7e47b14 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -15,7 +15,7 @@ jobs: php-version: "8.1" extensions: fileinfo - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Validate composer.json and composer.lock run: composer validate --strict @@ -82,7 +82,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: fileinfo, zip - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist @@ -103,7 +103,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run system tests (${{ matrix.script }}) run: php monorepo/scripts/tests/${{ matrix.script }}.php @@ -115,7 +115,7 @@ jobs: needs: run-smoke-tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v3 @@ -150,7 +150,7 @@ jobs: needs: run-smoke-tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v3 @@ -198,7 +198,7 @@ jobs: php-version: "8.1" coverage: xdebug extensions: fileinfo - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Composer packages id: composer-cache @@ -260,7 +260,7 @@ jobs: needs: run-smoke-tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download phpDocumentor run: | @@ -286,7 +286,7 @@ jobs: needs: run-smoke-tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: "8.1" @@ -334,7 +334,7 @@ jobs: needs: run-smoke-tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: "8.1" @@ -385,7 +385,7 @@ jobs: needs: run-smoke-tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: "8.1" @@ -436,7 +436,7 @@ jobs: - build-test-fixture-docs steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: 'gh-pages' @@ -518,7 +518,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: "8.1" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist @@ -536,7 +536,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: "8.1" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist @@ -554,7 +554,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: "8.1" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist @@ -571,7 +571,7 @@ jobs: security-events: write steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run DevSkim scanner uses: microsoft/DevSkim-Action@v1 @@ -600,7 +600,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -639,7 +639,7 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run linter run: php packages/hydefront/.github/scripts/post-build.php @@ -649,7 +649,7 @@ jobs: runs-on: ubuntu-latest name: Test monorepo tools can run steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - run: php monorepo/CodeIntelligence/CodeIntelligence.php - run: php monorepo/scripts/FileFormatter.php diff --git a/.github/workflows/deploy-documentation-preview.yml b/.github/workflows/deploy-documentation-preview.yml index 38cb84284a4..f38d36d8668 100644 --- a/.github/workflows/deploy-documentation-preview.yml +++ b/.github/workflows/deploy-documentation-preview.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Composer packages id: composer-cache diff --git a/.github/workflows/end-to-end-testing.yml b/.github/workflows/end-to-end-testing.yml index 33aae369fcc..60017e3e82e 100644 --- a/.github/workflows/end-to-end-testing.yml +++ b/.github/workflows/end-to-end-testing.yml @@ -12,7 +12,7 @@ jobs: dusk-browser-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Composer packages id: composer-cache diff --git a/.github/workflows/hyde-stan.yml b/.github/workflows/hyde-stan.yml index 34f4b1bcfda..81705218bad 100644 --- a/.github/workflows/hyde-stan.yml +++ b/.github/workflows/hyde-stan.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Static Analysis run: php ./monorepo/HydeStan/run.php diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 94abd54126a..2c8570e8840 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -12,7 +12,7 @@ jobs: run-smoke-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Composer packages id: composer-cache @@ -70,7 +70,7 @@ jobs: php-version: "8.1" coverage: xdebug extensions: fileinfo - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Composer packages id: composer-cache diff --git a/.github/workflows/split-monorepo.yml b/.github/workflows/split-monorepo.yml index 6e56719ac9f..4e4b497c166 100644 --- a/.github/workflows/split-monorepo.yml +++ b/.github/workflows/split-monorepo.yml @@ -23,13 +23,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/hyde - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/hyde path: hyde @@ -92,13 +92,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/framework - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/framework path: framework @@ -141,13 +141,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/realtime-compiler - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/realtime-compiler path: realtime-compiler @@ -189,13 +189,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/hydefront - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/hydefront path: hydefront @@ -237,13 +237,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/hydephp.com - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/hydephp.com path: website @@ -290,13 +290,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/testing - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/testing path: testing @@ -338,13 +338,13 @@ jobs: steps: - name: Checkout hydephp/develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: develop persist-credentials: false - name: Checkout hydephp/ui-kit - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: hydephp/ui-kit path: ui-kit diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index dba99d85384..8912950308e 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist diff --git a/.github/workflows/test-pull-requests.yml b/.github/workflows/test-pull-requests.yml index 251d6768d07..d6d0a49eac0 100644 --- a/.github/workflows/test-pull-requests.yml +++ b/.github/workflows/test-pull-requests.yml @@ -16,7 +16,7 @@ jobs: php-version: "8.1" coverage: xdebug extensions: fileinfo - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Validate composer.json and composer.lock run: composer validate --strict @@ -67,7 +67,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: fileinfo, zip - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Composer Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist From 3b00ab0048db59698a483a8590b955c795630f6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:40:42 +0000 Subject: [PATCH 13/13] Bump actions/upload-artifact from 1 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v1...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/continuous-integration.yml | 16 ++++++++-------- .github/workflows/end-to-end-testing.yml | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index eb5e7e47b14..5fca23341ca 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -131,7 +131,7 @@ jobs: run: npm run prod - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: 'hydefront' path: 'packages/hydefront/dist' @@ -170,7 +170,7 @@ jobs: run: cp _media/app.css packages/hydefront/dist/app.css - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: '_media' path: '_media' @@ -236,7 +236,7 @@ jobs: php ping.php "Monorepo PR Test" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }} - name: Upload coverage artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: "coverage" path: "build/coverage" @@ -245,7 +245,7 @@ jobs: run: cp build/junit.xml build/coverage/html/junit.xml - name: Upload HTML coverage artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: "html-coverage" path: "build/coverage/html" @@ -271,7 +271,7 @@ jobs: run: php phpDocumentor.phar --directory="packages/framework/src" --target="build/api-documentation" --title="API Documentation" - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: 'api-documentation' path: 'build/api-documentation' @@ -319,7 +319,7 @@ jobs: run: php hyde build - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: 'dev-docs' path: '_site/dev-docs' @@ -370,7 +370,7 @@ jobs: run: php hyde build - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: 'site-preview' path: '_site' @@ -415,7 +415,7 @@ jobs: run: php hyde build - name: Upload artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: 'test-fixture-docs' path: '_site' diff --git a/.github/workflows/end-to-end-testing.yml b/.github/workflows/end-to-end-testing.yml index 60017e3e82e..505b76ae4a7 100644 --- a/.github/workflows/end-to-end-testing.yml +++ b/.github/workflows/end-to-end-testing.yml @@ -47,27 +47,27 @@ jobs: - name: Upload Screenshots if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: screenshots path: tests/Browser/screenshots - name: Upload Compiled Source if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dusk-source path: tests/Browser/source - name: Upload Console Logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dusk-console path: tests/Browser/console - name: Upload app.css - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: 'app.css' path: '_media/app.css'