chore: update CI to use latest version of shiny.react #173
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
name: R-CMD-checks | |
jobs: | |
main: | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
runs-on: ${{ matrix.config.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macOS-latest, r: 'release'} | |
- {os: windows-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'release'} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Pandoc for windows-latest | |
if: matrix.config.os == 'windows-latest' | |
run: | | |
Set-ExecutionPolicy AllSigned | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install pandoc | |
- name: Setup Pandoc for ubuntu-latest | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install libcurl4-openssl-dev | |
sudo apt-get install -y r-cran-xml | |
sudo apt-get install -y libharfbuzz-dev libfribidi-dev | |
- name: Setup Pandoc for macOS-latest | |
if: matrix.config.os == 'macOS-latest' | |
run: | | |
brew install pandoc | |
- name: Install R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
cache-version: 2 | |
needs: check | |
pak-version: 'stable' | |
extra-packages: any::devtools, any::optparse, local::. | |
- name: Install shiny.react with React 18.3.1 | |
if: always() | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
Rscript -e 'install.packages("remotes"); remotes::install_github("Appsilon/shiny.react")' | |
- name: R CMD check | |
uses: r-lib/actions/check-r-package@v2 | |
with: | |
args: 'c("--no-manual", "--as-cran")' | |
error-on: '"note"' | |
check-dir: '"check"' | |
- name: Lint | |
if: always() | |
shell: Rscript {0} | |
run: | | |
lints <- lintr::lint_package() | |
for (lint in lints) print(lint) | |
quit(status = length(lints) > 0) | |
- name: Spell Check | |
if : always() | |
shell: Rscript {0} | |
run: | | |
spell_check <- spelling::spell_check_package(use_wordlist = TRUE) | |
cli::cli_alert_warning("There are {nrow(spell_check)} spelling error{?s}.") | |
if (nrow(spell_check) > 0) { | |
print(spell_check) | |
} | |
quit(status = nrow(spell_check) > 0) | |
- name: Test coverage | |
if: matrix.config.os == 'ubuntu-latest' && matrix.config.r == 'release' | |
run: | | |
Rscript -e 'covr::codecov()' |