From a23e5d0fdf711bfad9184f75e232aa7af3b94cf8 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sat, 1 Jan 2022 09:38:59 +0000 Subject: [PATCH 1/2] Use better named environment for deployments --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a482785a..78c95b43 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,7 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest - environment: Deployments + environment: Hetzner env: repository: 'jonnybarnes/jonnybarnes.uk' newReleaseName: '${{ github.run_id }}' From 738be809832b1be7c6d92b2ffcfc471a8386b5e5 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sat, 1 Jan 2022 09:48:37 +0000 Subject: [PATCH 2/2] Fix a failing test due to changing year --- tests/Unit/ArticlesTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Unit/ArticlesTest.php b/tests/Unit/ArticlesTest.php index 1412afc3..fe9111ac 100644 --- a/tests/Unit/ArticlesTest.php +++ b/tests/Unit/ArticlesTest.php @@ -72,12 +72,12 @@ class ArticlesTest extends TestCase Article::factory()->create(); $yearAndMonth = Article::date(date('Y'), date('m'))->get(); - $this->assertTrue(count($yearAndMonth) === 1); + $this->assertCount(1, $yearAndMonth); - $priorYear = Article::date(date('Y') - 1, 1)->get(); - $this->assertTrue(count($priorYear) === 0); + $priorYear = Article::date(date('Y') - 2, 1)->get(); + $this->assertCount(0, $priorYear); $emptyScope = Article::date()->get(); - $this->assertTrue(count($emptyScope) === 2); + $this->assertCount(2, $emptyScope); } }