Skip to content

test

test #99

Workflow file for this run

on:
schedule:
- cron: "0 0 1 * *"
push:
branches:
- main
- master
name: send-test
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
matrix:
config:
- {os: macOS-latest, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
SENDGRID_API: ${{ secrets.SENDGRID_API }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: cachem
- name: Install package
run: R CMD INSTALL .
- name: Check Base
run: |
keyring::key_set_with_value(service = "apikey",
username = "sendgridr",
password = Sys.getenv("SENDGRID_API"))
library(sendgridr)
mail() |>
from("[email protected]") |>
to("[email protected]") |>
subject("sendgridr package weekly send test") |>
body("body is ok") |>
attachments("man/figures/logo.png") |>
send() -> chk
print(chk)
if (!is.null(chk$errors)) {
stop("send fail!")
}
shell: Rscript {0}
- name: Check Rmd Render
run: |
library(sendgridr)
path <- system.file("extdata", "test.Rmd", package = "sendgridr")
mail() |>
from("[email protected]") |>
to("[email protected]") |>
subject("sendgridr package weekly send test") |>
embed_rmd(path) |>
send() -> chk
print(chk)
if (!is.null(chk$errors)) {
stop("send fail!")
}
shell: Rscript {0}