From 5b1acc40e3e63539edb1b6289ac1fad5338a3b78 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 12 Apr 2024 13:31:54 +0200 Subject: [PATCH 1/4] Remove directory after test class --- .../tests/Feature/SourceDirectoriesCanBeChangedTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/framework/tests/Feature/SourceDirectoriesCanBeChangedTest.php b/packages/framework/tests/Feature/SourceDirectoriesCanBeChangedTest.php index 51bd2016184..5be594d3a8c 100644 --- a/packages/framework/tests/Feature/SourceDirectoriesCanBeChangedTest.php +++ b/packages/framework/tests/Feature/SourceDirectoriesCanBeChangedTest.php @@ -4,6 +4,7 @@ namespace Hyde\Framework\Testing\Feature; +use Illuminate\Support\Facades\File; use Hyde\Framework\HydeServiceProvider; use Hyde\Pages\BladePage; use Hyde\Pages\DocumentationPage; @@ -17,6 +18,13 @@ */ class SourceDirectoriesCanBeChangedTest extends TestCase { + public static function tearDownAfterClass(): void + { + parent::tearDownAfterClass(); + + File::deleteDirectory('_source'); + } + public function testBaselines() { $this->assertEquals('_pages', HtmlPage::sourceDirectory()); From ca2e2c8e8e440a730053b868730f6bb06e82622a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 12 Apr 2024 20:14:21 +0200 Subject: [PATCH 2/4] Update Codecov to fail on errors --- .github/workflows/smoke-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 8b9912ad4cf..e636ea7e6fe 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -88,6 +88,7 @@ jobs: uses: codecov/codecov-action@v3 with: functionalities: network + fail_ci_if_error: true - name: Ping statistics server with test results run: | From 5e40afb441ae8f75fe2d3b30f9cd206d24c75537 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 12 Apr 2024 20:18:51 +0200 Subject: [PATCH 3/4] Run Codecov action with the token See https://github.com/codecov/codecov-action/issues/598#issuecomment-1521524588 --- .github/workflows/smoke-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index e636ea7e6fe..ce523935484 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -87,6 +87,7 @@ jobs: - name: "Publish coverage report to Codecov" uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} functionalities: network fail_ci_if_error: true From 4c05fb678f85f3fc80d746ca1e4d2049267252f1 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 14 Apr 2024 12:29:19 +0200 Subject: [PATCH 4/4] Update Codecov action --- .github/workflows/smoke-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index ce523935484..de338347c6c 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -85,10 +85,9 @@ jobs: run: vendor/bin/pest --coverage --coverage-clover clover.xml --log-junit report.xml - name: "Publish coverage report to Codecov" - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - functionalities: network fail_ci_if_error: true - name: Ping statistics server with test results