Skip to content

Commit

Permalink
fix check workflow issue on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bcallaway11 committed Sep 3, 2024
1 parent ce38e5b commit 44d5e58
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: R-CMD-check

on:
push:
branches: [main, master] # Triggers on push to main or master
branches: [main, master]
pull_request:
branches: [main, master] # Triggers on pull requests to main or master
workflow_dispatch: # Allows manual triggering
branches: [main, master]
workflow_dispatch:

jobs:
R-CMD-check:
Expand All @@ -29,20 +29,20 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3 # Updated to the latest version
uses: actions/checkout@v3

- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2 # Updated to the latest version
uses: r-lib/actions/setup-pandoc@v2

- name: Set up R
uses: r-lib/actions/setup-r@v2 # Updated to the latest version
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux' # Only necessary for Linux runners
if: runner.os == 'Linux'
run: sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev

- name: Cache R packages
Expand All @@ -55,7 +55,12 @@ jobs:
${{ runner.os }}-r-
- name: Install R package dependencies
run: R -e "install.packages('devtools'); devtools::install_deps(dependencies = TRUE)"
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
cmd.exe /c "R -e \"install.packages('devtools'); devtools::install_deps(dependencies = TRUE)\""
else
R -e "install.packages('devtools'); devtools::install_deps(dependencies = TRUE)"
fi
- name: Run R CMD check
uses: r-lib/actions/check-r-package@v2 # Updated to the latest version
uses: r-lib/actions/check-r-package@v2

0 comments on commit 44d5e58

Please sign in to comment.