Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjie1991 committed Jul 7, 2024
1 parent f2b3e5d commit 007c1b4
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 4 deletions.
103 changes: 100 additions & 3 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.


name: R

on:
Expand All @@ -18,23 +19,119 @@ permissions:
contents: read

jobs:
build:
macos:
runs-on: macos-latest
strategy:
matrix:
r-version: ['4.1.1']
r-version: ['4.3.0']

steps:
- uses: actions/checkout@v3
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "r-dependencies.rds")
shell: Rscript {0}

- name: Cache R dependencies
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r-version }}-1-${{ hashFiles('r-dependencies.rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r-version }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Install pandoc
run: brew install pandoc

- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}

linux:
runs-on: ubuntu-20.04
strategy:
matrix:
r-version: ['4.3.0']

steps:
- uses: actions/checkout@v3
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "r-dependencies.rds")
shell: Rscript {0}

- name: Cache R dependencies
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r-version }}-1-${{ hashFiles('r-dependencies.rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r-version }}-1-

- name: Install pandoc
run: sudo apt-get install pandoc libcurl4-openssl-dev

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}

windows:
runs-on: windows-latest
strategy:
matrix:
r-version: ['4.3.0']

steps:
- uses: actions/checkout@v3
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "r-dependencies.rds")
shell: Rscript {0}

- name: Cache R dependencies
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r-version }}-1-${{ hashFiles('r-dependencies.rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r-version }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Install pandoc
run: choco install pandoc

- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
1 change: 0 additions & 1 deletion R/server.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# library(sysfonts)
font_list = sort(unique(sysfonts::font_files()$family))

response_fg_font_ls = function() {
Expand Down

0 comments on commit 007c1b4

Please sign in to comment.