From 8342b64f45ddf733c8c95099fb018b96268b6e8b Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Wed, 24 Apr 2024 13:49:17 +0200 Subject: [PATCH] Try this --- .github/workflows/R-CMD-check.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 714726f..42877be 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -47,10 +47,15 @@ jobs: run: | Set-Service mongodb -StartupType Automatic Do { + try { Write-Host "Trying to start MongoDB..." Start-Service MongoDB - Start-Sleep -Seconds 10 - $Service = Get-Service MongoDB + } + catch { + "Failure occurred in Start-Service MongoDB." + } + Start-Sleep -Seconds 5 + $Service = Get-Service MongoDB } Until ($Service.Status -eq "Running") - uses: r-lib/actions/setup-r@v2