Simplify example_cards.R by using bslib #1220
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
# NOTE: This workflow is overkill for most R packages | |
# check-standard.yaml is likely a better choice | |
# usethis::use_github_action("check-standard") will install it. | |
# | |
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. | |
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
timeout-minutes: 30 | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macOS-latest, r: 'release'} | |
- {os: windows-latest, r: 'release'} | |
- {os: windows-latest, r: '3.6'} | |
- {os: ubuntu-20.04, r: 'devel', http-user-agent: 'release'} | |
- {os: ubuntu-20.04, r: 'release'} | |
- {os: ubuntu-20.04, r: 'oldrel-1'} | |
- {os: ubuntu-20.04, r: 'oldrel-2'} | |
- {os: ubuntu-20.04, r: 'oldrel-3'} | |
- {os: ubuntu-20.04, r: 'oldrel-4'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
outputs: | |
requested-shinyapps-deploy: ${{ steps.request-shinyapps-deploy.outputs.requested }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
id: install-r | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
pak-version: rc | |
cache-version: 1 | |
extra-packages: any::rcmdcheck | |
# If events is a PR, set subdir to 'preview/pr<pr_number>' | |
- name: "[PR] Set optional tests in PR branch" | |
if: github.event_name == 'pull_request' | |
run: | | |
echo "CI_IN_PR=true" >> $GITHUB_ENV | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
upload-snapshots: true | |
- name: Schedule shinyapps.io deploy | |
id: request-shinyapps-deploy | |
if: matrix.config.os == 'ubuntu-20.04' && matrix.config.r == 'release' | |
run: | | |
echo "::set-output name=requested::true" | |
- name: Code coverage | |
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release' | |
shell: Rscript {0} | |
run: | | |
pak::pkg_install("covr") | |
covr::codecov() | |
deploy: | |
if: > | |
always() && | |
github.event_name == 'push' && | |
needs.R-CMD-check.outputs.requested-shinyapps-deploy == 'true' | |
needs: R-CMD-check | |
concurrency: | |
group: deploy-shinyapps-${{ github.ref }} | |
cancel-in-progress: true | |
name: Deploy Tutorials to shinyapps.io | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Deploy packaged tutorials to shinyapps.io | |
uses: rstudio/education-workflows/deploy-learnr-shinyapps-io@v1 | |
with: | |
shinyapps-name: ${{ secrets.SHINYAPPS_NAME }} | |
shinyapps-token: ${{ secrets.SHINYAPPS_TOKEN }} | |
shinyapps-secret: ${{ secrets.SHINYAPPS_SECRET }} | |
tutorials: | | |
inst/tutorials | |
extra-packages: | | |
any::nycflights13 | |
any::tidyverse | |
any::Lahman | |
any::DBI | |
any::RSQLite | |
any::sortable | |
any::dygraphs | |
any::reticulate | |
github::rstudio/gradethis |