Skip to content

Commit

Permalink
master -> main; use shiny-workflows (#3535)
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke authored Nov 19, 2021
1 parent bc6ff57 commit 6a7ffef
Show file tree
Hide file tree
Showing 22 changed files with 65 additions and 333 deletions.
12 changes: 12 additions & 0 deletions .github/shiny-workflows/routine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -e
. ./tools/documentation/checkDocsCurrent.sh

echo "Updating package.json version to match DESCRIPTION Version"
Rscript ./tools/updatePackageJsonVersion.R
if [ -n "$(git status --porcelain package.json)" ]
then
yarn build
git add ./inst package.json && git commit -m 'Sync package version (GitHub Actions)' || echo "No package version to commit"
else
echo "No package version difference detected; package.json is current."
fi
146 changes: 15 additions & 131 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,139 +1,23 @@
# 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.
# Workflow derived from https://github.com/rstudio/shiny-workflows
#
# 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
# NOTE: This Shiny team GHA workflow is overkill for most R packages.
# For most R packages it is better to use https://github.com/r-lib/actions
on:
push:
branches:
- main
- master
branches: [main, rc-**]
pull_request:
branches:
- main
- master
- rc-v**
branches: [main]
schedule:
- cron: '0 5 * * 1' # every monday

name: R-CMD-check
name: Package checks

jobs:

rversions:
name: R Versions
runs-on: ubuntu-latest
outputs:
devel: ${{ steps.devel.outputs.installed-r-version }}
release: ${{ steps.release.outputs.installed-r-version }}
oldrel1: ${{ steps.oldrel1.outputs.installed-r-version }}
oldrel2: ${{ steps.oldrel2.outputs.installed-r-version }}
oldrel3: ${{ steps.oldrel3.outputs.installed-r-version }}
oldrel4: ${{ steps.oldrel4.outputs.installed-r-version }}
steps:
- { name: devel, uses: r-lib/actions/setup-r@master, id: devel, with: { r-version: devel, install-r: false }}
- { name: release, uses: r-lib/actions/setup-r@master, id: release, with: { r-version: release, install-r: false }}
- { name: oldrel/1, uses: r-lib/actions/setup-r@master, id: oldrel1, with: { r-version: oldrel/1, install-r: false }}
- { name: oldrel/2, uses: r-lib/actions/setup-r@master, id: oldrel2, with: { r-version: oldrel/2, install-r: false }}
- { name: oldrel/3, uses: r-lib/actions/setup-r@master, id: oldrel3, with: { r-version: oldrel/3, install-r: false }}
- { name: oldrel/4, uses: r-lib/actions/setup-r@master, id: oldrel4, with: { r-version: oldrel/4, install-r: false }}


website:
uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
routine:
uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1
with:
node-version: "14.x"
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

needs:
- rversions
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: '${{ needs.rversions.outputs.release }}'}
- {os: windows-latest, r: '${{ needs.rversions.outputs.release }}'}
- {os: windows-latest, r: '3.6'}

- {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.devel }}', http-user-agent: "release" }
- {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.release }}'}
- {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel1 }}'}
- {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel2 }}'}
- {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel3 }}'}
- {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel4 }}'}

- {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.devel }}', http-user-agent: "release" }
- {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.release }}'}
- {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel1 }}'}
- {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel2 }}'}
- {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel3 }}'}
- {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel4 }}'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
# https://github.com/actions/checkout/issues/135
- name: Set git to use LF
if: runner.os == 'Windows'
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
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@v1

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck

# xquartz and cairo are needed for Cairo package.
# harfbuzz and fribidi are needed for textshaping package.
- name: Mac systemdeps
if: runner.os == 'macOS'
run: |
brew install --cask xquartz
brew install cairo
brew install harfbuzz fribidi
- name: Find PhantomJS path
id: phantomjs
run: |
echo "::set-output name=path::$(Rscript -e 'cat(shinytest:::phantom_paths()[[1]])')"
- name: Cache PhantomJS
uses: actions/cache@v2
with:
path: ${{ steps.phantomjs.outputs.path }}
key: ${{ matrix.config.os }}-phantomjs
restore-keys: ${{ matrix.config.os }}-phantomjs
- name: Install PhantomJS
run: >
Rscript
-e "if (!shinytest::dependenciesInstalled()) shinytest::installDependencies()"
- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_FORCE_SUGGESTS_: ${{ matrix.config.r != 'devel' }}
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
path: check
uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1
171 changes: 0 additions & 171 deletions .github/workflows/rituals.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: shiny
Type: Package
Title: Web Application Framework for R
Version: 1.7.1.9001
Version: 1.7.1.9002
Authors@R: c(
person("Winston", "Chang", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-1576-2126")),
person("Joe", "Cheng", role = "aut", email = "[email protected]"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ shiny 1.7.0

### Other improvements

* Shiny's core JavaScript code was converted to TypeScript. For the latest development information, please see the [README.md in `./srcts`](https://github.com/rstudio/shiny/tree/master/srcts). (#3296)
* Shiny's core JavaScript code was converted to TypeScript. For the latest development information, please see the [README.md in `./srcts`](https://github.com/rstudio/shiny/tree/v1.7.0/srcts). (#3296)

* Switched from `digest::digest()` to `rlang::hash()` for hashing. (#3264)

Expand Down
2 changes: 1 addition & 1 deletion R/mock-session.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Promise helpers taken from:
# https://github.com/rstudio/promises/blob/master/tests/testthat/common.R
# https://github.com/rstudio/promises/blob/main/tests/testthat/common.R
# Block until all pending later tasks have executed
wait_for_it <- function() {
while (!later::loop_empty()) {
Expand Down
4 changes: 2 additions & 2 deletions R/run-url.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#' @examples
#' ## Only run this example in interactive R sessions
#' if (interactive()) {
#' runUrl('https://github.com/rstudio/shiny_example/archive/master.tar.gz')
#' runUrl('https://github.com/rstudio/shiny_example/archive/main.tar.gz')
#'
#' # Can run an app from a subdirectory in the archive
#' runUrl("https://github.com/rstudio/shiny_example/archive/master.zip",
#' runUrl("https://github.com/rstudio/shiny_example/archive/main.zip",
#' subdir = "inst/shinyapp/")
#' }
runUrl <- function(url, filetype = NULL, subdir = NULL, destdir = NULL, ...) {
Expand Down
Loading

0 comments on commit 6a7ffef

Please sign in to comment.