From e5e40ccc0ab703add5334d0862c67ebe47286966 Mon Sep 17 00:00:00 2001 From: GeraldineGomez Date: Wed, 31 Jul 2024 11:48:42 -0500 Subject: [PATCH] chore: proof of es_ES installation on MacOs and Windows Ref: #194 --- .github/workflows/R-CMD-check.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 204d6033..66a86483 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -80,17 +80,25 @@ jobs: extra-packages: any::rcmdcheck needs: check - - name: Install system dependencies + - name: Install hunspell and es_ES dictionary run: | if [[ $RUNNER_OS == 'Linux' ]]; then sudo apt-get install -y hunspell hunspell-es elif [[ $RUNNER_OS == 'macOS' ]]; then brew install hunspell - curl -L -o "es-ES.aff" https://raw.githubusercontent.com/wooorm/dictionaries/main/dictionaries/es/index.aff - curl -L -o "es-ES.dic" https://raw.githubusercontent.com/wooorm/dictionaries/main/dictionaries/es/index.dic + curl -L -o "es-ES.aff" https://cgit.freedesktop.org/libreoffice/dictionaries/tree/es/es_ES.aff + curl -L -o "es-ES.dic" https://cgit.freedesktop.org/libreoffice/dictionaries/tree/es/es_ES.dic mv es-ES.aff es-ES.dic ~/Library/Spelling/ + elif [[ $RUNNER_OS == 'Windows' ]]; then + choco install hunspell + Invoke-WebRequest -Uri "https://cgit.freedesktop.org/libreoffice/dictionaries/tree/es/es_ES.aff" -OutFile "es-ES.aff" + Invoke-WebRequest -Uri "https://cgit.freedesktop.org/libreoffice/dictionaries/tree/es/es_ES.dic" -OutFile "es-ES.dic" + Expand-Archive -Path "es-ES.aff" -DestinationPath "$env:LOCALAPPDATA/hunspell/dictionaries" + Expand-Archive -Path "es-ES.dic" -DestinationPath "$env:LOCALAPPDATA/hunspell/dictionaries" + else + echo "$RUNNER_OS not supported" + exit 1 fi - - uses: r-lib/actions/check-r-package@v2 id: rcmdcheck with: