Skip to content

Update to newest CI #4656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches:
- master
branches: [main, master]
pull_request:
branches:
- master
branches: [main, master]

name: R-CMD-check

Expand All @@ -29,8 +33,8 @@ jobs:
- {os: ubuntu-18.04, r: '4.0', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.6', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.5', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.4', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.3', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.4', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.3', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand Down Expand Up @@ -74,16 +78,13 @@ jobs:
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')

- name: Install system dependencies on macOS
if: runner.os == 'macOS'
run: |
# XQuartz is needed by vdiffr
brew install xquartz

# Use only binary packages
echo 'options(pkgType = "binary")' >> ~/.Rprofile

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
Expand Down
52 changes: 13 additions & 39 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,34 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- master
release:
types: [published]
branches: [main, master]
tags: ['*']

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
id: install-r

- 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
- uses: r-lib/actions/setup-r@v1
with:
path: |
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("pkgdown", execute = TRUE)
shell: Rscript {0}

- name: Install dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE, dependencies = c("all", "Config/Needs/website"))
pak::pkg_install("r-lib/pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
needs: website

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
36 changes: 28 additions & 8 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,75 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
issue_comment:
types: [created]

name: Commands

jobs:
document:
if: startsWith(github.event.comment.body, '/document')
name: document
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/pr-fetch@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v1
- name: Install dependencies
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
with:
use-public-rspm: true

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

- name: Document
run: Rscript -e 'roxygen2::roxygenise()'

- name: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add man/\* NAMESPACE
git commit -m 'Document'

- uses: r-lib/actions/pr-push@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

style:
if: startsWith(github.event.comment.body, '/style')
name: style
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/pr-fetch@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v1

- name: Install dependencies
run: Rscript -e 'install.packages("styler")'

- name: Style
run: Rscript -e 'styler::style_pkg()'

- name: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add \*.R
git commit -m 'Style'

- uses: r-lib/actions/pr-push@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
46 changes: 9 additions & 37 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,29 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- master
branches: [main, master]
pull_request:
branches:
- master
branches: [main, master]

name: test-coverage

# Increment this version when we want to clear cache
env:
cache-version: v1

jobs:
test-coverage:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
id: install-r

- 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: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-${{ env.cache-version }}-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-${{ env.cache-version }}-
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("covr", execute = TRUE)
shell: Rscript {0}

- name: Install dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("covr")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: covr

- name: Test coverage
run: covr::codecov()
Expand Down
2 changes: 2 additions & 0 deletions R/geom-segment.r
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
#' arrow = arrow(length = unit(0.03, "npc"))
#' )
#'
#' if (requireNamespace('maps', quietly = TRUE)) {
#' ggplot(seals, aes(long, lat)) +
#' geom_segment(aes(xend = long + delta_long, yend = lat + delta_lat),
#' arrow = arrow(length = unit(0.1,"cm"))) +
#' borders("state")
#' }
#'
#' # Use lineend and linejoin to change the style of the segments
#' df2 <- expand.grid(
Expand Down
12 changes: 7 additions & 5 deletions R/geom-sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@
#' annotate("point", x = -80, y = 35, colour = "red", size = 4) +
#' coord_sf(default_crs = sf::st_crs(4326))
#'
#' # To add labels, use geom_sf_label().
#' ggplot(nc_3857[1:3, ]) +
#' geom_sf(aes(fill = AREA)) +
#' geom_sf_label(aes(label = NAME))
#' }
#'
#' # Thanks to the power of sf, a geom_sf nicely handles varying projections
#' # setting the aspect ratio correctly.
#' if (requireNamespace('maps', quietly = TRUE)) {
#' library(maps)
#' world1 <- sf::st_as_sf(map('world', plot = FALSE, fill = TRUE))
#' ggplot() + geom_sf(data = world1)
Expand All @@ -99,11 +106,6 @@
#' "+proj=laea +y_0=0 +lon_0=155 +lat_0=-90 +ellps=WGS84 +no_defs"
#' )
#' ggplot() + geom_sf(data = world2)
#'
#' # To add labels, use geom_sf_label().
#' ggplot(nc_3857[1:3, ]) +
#' geom_sf(aes(fill = AREA)) +
#' geom_sf_label(aes(label = NAME))
#' }
#' @name ggsf
NULL
Expand Down
6 changes: 4 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ knitr::opts_chunk$set(

# ggplot2 <img src="man/figures/logo.png" align="right" width="120" />

[![R build status](https://github.com/tidyverse/ggplot2/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/ggplot2/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/tidyverse/ggplot2/master.svg)](https://codecov.io/github/tidyverse/ggplot2?branch=master)
<!-- badges: start -->
[![R-CMD-check](https://github.com/tidyverse/ggplot2/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/ggplot2/actions)
[![Codecov test coverage](https://codecov.io/gh/tidyverse/ggplot2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2?branch=main)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
<!-- badges: end -->

## Overview

Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

# ggplot2 <img src="man/figures/logo.png" align="right" width="120" />

[![R build
status](https://github.com/tidyverse/ggplot2/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/ggplot2/actions)
[![Coverage
Status](https://img.shields.io/codecov/c/github/tidyverse/ggplot2/master.svg)](https://codecov.io/github/tidyverse/ggplot2?branch=master)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
<!-- badges: start -->

[![R-CMD-check](https://github.com/tidyverse/ggplot2/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/ggplot2/actions)
[![Codecov test
coverage](https://codecov.io/gh/tidyverse/ggplot2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2?branch=main)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
<!-- badges: end -->

## Overview

Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ coverage:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
2 changes: 2 additions & 0 deletions man/geom_segment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions man/ggsf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading