diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index b61c9e2..714726f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -43,11 +43,15 @@ jobs: run: sudo systemctl restart mongod - if: runner.os == 'windows' + continue-on-error: true run: | Set-Service mongodb -StartupType Automatic - Set-Service mongodb -StartupType Automatic - Set-Service mongodb -StartupType Automatic - Start-Service -Name MongoDB + Do { + Write-Host "Trying to start MongoDB..." + Start-Service MongoDB + Start-Sleep -Seconds 10 + $Service = Get-Service MongoDB + } Until ($Service.Status -eq "Running") - uses: r-lib/actions/setup-r@v2 with: