-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip upgrade to plotly.js 2.0 * patch plotly.js source to support phantomjs/shinytest reverts part of plotly/plotly.js#5380 * bump mathjax version * use npm instead of yarn * make geom_bar() default to textposition='none'; approve new vdiffr 0.4 + plotly.js 2.0 baselines * Migrate to vdiffr 1.0 * Use layout.legend.title over layout.annotations to when converting guides for discrete scales * wip migrate to gha * try npm install * setup node * use recommended node version * try mac instead * install phantomjs; various cleanup * intentionally break a visual test * fix * use thematic's approach to testing * bump version * regenerate snapshots * map secrets to env variables * accept new gha baselines * whoops * hmm * approve shinytest baseline * intentionally break a visual test * always upload * revert change; new baselines * Remove the vdiffr dependency and use testthat snaphots directly * More obvious env var naming * more gha details * always upload * new snaps * intentionally break a visual test (again) * Revert "intentionally break a visual test (again)" This reverts commit a4e306c.
- Loading branch information
Showing
765 changed files
with
864 additions
and
868 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ revdep/ | |
README.Rmd | ||
abbvie.R | ||
^\.httr-oauth$ | ||
^\.github$ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# 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 | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, r: 'release', visual_tests: true, node: "14.x", shinytest: true} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"} | ||
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" } | ||
# vdiffr & shinytest only runs on linux r-release since the results aren't cross-platform | ||
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} | ||
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} | ||
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} | ||
- {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} | ||
- {os: ubuntu-18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} | ||
|
||
env: | ||
RSPM: ${{ matrix.config.rspm }} | ||
VISUAL_TESTS: ${{ matrix.config.visual_tests }} | ||
SHINYTEST: ${{ matrix.config.shinytest }} | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} | ||
plotly_username: ${{ secrets.PLOTLY_USERNAME }} | ||
plotly_api_key: ${{ secrets.PLOTLY_API_KEY }} | ||
|
||
steps: | ||
- 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 }} | ||
|
||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Install pak and query dependencies | ||
run: | | ||
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") | ||
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") | ||
shell: Rscript {0} | ||
|
||
- name: Restore R package cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ env.R_LIBS_USER }}/* | ||
!${{ env.R_LIBS_USER }}/pak | ||
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} | ||
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1- | ||
|
||
- name: Install system dependencies | ||
if: runner.os == 'Linux' | ||
run: | | ||
pak::local_system_requirements(execute = TRUE) | ||
pak::pkg_system_requirements("rcmdcheck", execute = TRUE) | ||
shell: Rscript {0} | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.config.node }} | ||
|
||
- name: Install orca | ||
if: matrix.config.visual_tests == true | ||
run: npm install -g [email protected] orca | ||
shell: bash | ||
|
||
- name: Install phantomjs | ||
if: matrix.config.shinytest == true | ||
run: | | ||
pak::pak("shinytest") | ||
shinytest::installDependencies() | ||
pak::pak() | ||
shell: Rscript {0} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pak::local_install_dev_deps(upgrade = TRUE) | ||
pak::pkg_install("rcmdcheck") | ||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
|
||
# Run test() before R CMD check since, for some reason, rcmdcheck::rcmdcheck() skips vdiffr tests | ||
- name: Run Tests | ||
run: | | ||
options(crayon.enabled = TRUE) | ||
if (!require(devtools)) pak::pak("devtools") | ||
if (!require(reshape2)) pak::pak("reshape2") | ||
res <- devtools::test() | ||
df <- as.data.frame(res) | ||
if (sum(df$failed) > 0 || any(df$error)) stop("GHA CI tests failed") | ||
shell: Rscript {0} | ||
|
||
# Upload the whole pkg since tests where run with devtools::test() | ||
- name: Upload check results | ||
if: always() | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
path: ./ | ||
|
||
# Run check with --no-tests since we ran them abve | ||
- name: Check | ||
run: | | ||
options(crayon.enabled = TRUE) | ||
rcmdcheck::rcmdcheck(args = c("--no-tests", "--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: Don't use tar from old Rtools to store the cache | ||
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }} | ||
shell: bash | ||
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
Binary file not shown.
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
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
Oops, something went wrong.