Skip to content

Commit

Permalink
Merge pull request #3 from nlmixr2/update-ci
Browse files Browse the repository at this point in the history
Update continuous integration and pkgdown building
  • Loading branch information
billdenney committed Apr 5, 2023
2 parents 8f33876 + c912b4f commit 396a72a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 55 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/R-CMD-check.yaml
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,18 +29,21 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
60 changes: 29 additions & 31 deletions .github/workflows/pkgdown.yaml
@@ -1,48 +1,46 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
- master
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Cache R packages
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
extra-packages: any::pkgdown, local::.
needs: website

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
5 changes: 3 additions & 2 deletions DESCRIPTION
Expand Up @@ -29,9 +29,10 @@ Description: Datasets for 'nlmixr2' and 'rxode2'. 'nlmixr2' is used for fitting
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Depends:
R (>= 2.10)
LazyData: true
BugReports: https://github.com/nlmixr2/nlmixr2data/issues/
URL: https://nlmixr2.github.io/nlmixr2data/, https://github.com/nlmixr2/nlmixr2data/
URL: https://nlmixr2.github.io/nlmixr2data/,
https://github.com/nlmixr2/nlmixr2data/
15 changes: 8 additions & 7 deletions README.Rmd
Expand Up @@ -16,26 +16,27 @@ knitr::opts_chunk$set(
# nlmixr2data

<!-- badges: start -->
[![R-CMD-check](https://github.com/nlmixr2/nlmixr2data/workflows/R-CMD-check/badge.svg)](https://github.com/nlmixr2/nlmixr2data/actions)
[![R-CMD-check](https://github.com/nlmixr2/nlmixr2data/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nlmixr2/nlmixr2data/actions/workflows/R-CMD-check.yaml)
[![CodeFactor](https://www.codefactor.io/repository/github/nlmixr2/nlmixr2data/badge)](https://www.codefactor.io/repository/github/nlmixr2/nlmixr2data)
<!-- badges: end -->

The goal of nlmixr2data is to include all the example dataset from the nlmixr2 project in one place
The goal of nlmixr2data is to include all the example datasets from the nlmixr2
project in one place.

## Example

This shows the `theo_sd` dataset, the hello world for nlmixr2
This shows the `theo_sd` dataset, the hello world for nlmixr2.

```{r example}
library(nlmixr2data)
head(theo_sd)
```
## Installation

You can install the development version of nlmixr2data from [GitHub](https://github.com/) with:
You can install the development version of nlmixr2data from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("nlmixr2/nlmixr2data")
# install.packages("remotes")
remotes::install_github("nlmixr2/nlmixr2data")
```

12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -5,16 +5,16 @@

<!-- badges: start -->

[![R-CMD-check](https://github.com/nlmixr2/nlmixr2data/workflows/R-CMD-check/badge.svg)](https://github.com/nlmixr2/nlmixr2data/actions)
[![R-CMD-check](https://github.com/nlmixr2/nlmixr2data/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nlmixr2/nlmixr2data/actions/workflows/R-CMD-check.yaml)
[![CodeFactor](https://www.codefactor.io/repository/github/nlmixr2/nlmixr2data/badge)](https://www.codefactor.io/repository/github/nlmixr2/nlmixr2data)
<!-- badges: end -->

The goal of nlmixr2data is to include all the example dataset from the
nlmixr2 project in one place
The goal of nlmixr2data is to include all the example datasets from the
nlmixr2 project in one place.

## Example

This shows the `theo_sd` dataset, the hello world for nlmixr2
This shows the `theo_sd` dataset, the hello world for nlmixr2.

``` r
library(nlmixr2data)
Expand All @@ -34,6 +34,6 @@ You can install the development version of nlmixr2data from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("nlmixr2/nlmixr2data")
# install.packages("remotes")
remotes::install_github("nlmixr2/nlmixr2data")
```
2 changes: 1 addition & 1 deletion _pkgdown.yml
@@ -1,4 +1,4 @@
url: https://nlmixr2.github.io/nlmixr2data
url: https://nlmixr2.github.io/nlmixr2data/
template:
bootstrap: 5
params:
Expand Down

0 comments on commit 396a72a

Please sign in to comment.