Skip to content

Commit

Permalink
Add OSP github actions (#1394)
Browse files Browse the repository at this point in the history
* Add OSP github actions
+ remove Appveyor files
+ remove docs/ (will be build on gh-pages)
+ update badges

* Build the pkgdown website on PR
Will not push to gh-pages during PR, only when merged
+ remove unused action

* allowing vignette execution error

* Update snapshots with latest tlf version

* fix typos

* Add a workflow step to increase dev version automatically
+ refactor all jobs in one main workflow
  • Loading branch information
Felixmil authored Jul 4, 2024
1 parent 81e4598 commit c8d202b
Show file tree
Hide file tree
Showing 568 changed files with 176 additions and 105,983 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ tests\^spelling
^BinaryFiles$
^README\.Rmd$
^vignettes/images/simulation_lifecycle_flowcharts\.drawio$
^\.github$
^codecov\.yml$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
38 changes: 38 additions & 0 deletions .github/workflows/bump-dev-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: bump-dev-version

on:
workflow_call:

jobs:
bump-dev-version:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions: write-all
steps:
- uses: actions/checkout@v4

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install packages
run: |
install.packages("usethis")
shell: Rscript {0}

- name: Change DESCRIPTION file
run: |
if(usethis:::is_dev_version()){
desc::desc_set_version(version = usethis:::bump_version()[["dev"]])
}
shell: Rscript {0}

- name: commit modified DESCRIPTION file
uses: EndBug/add-and-commit@v9
if: ${{ success() }}
with:
message: '🤖 Bump development version.'
default_author: github_actions
add: 'DESCRIPTION'
43 changes: 43 additions & 0 deletions .github/workflows/main-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Main-Workflow

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]


jobs:
bump-dev-version: # only do that when actually merging in main/develop branch
if: github.event_name != 'pull_request'
uses: ./.github/workflows/bump-dev-version.yaml
R-CMD-Check:
if: ${{ always() }}
needs: [bump-dev-version]
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/R-CMD-check-build.yml@main
with:
install-pksim: true
install-rClr: true
extra-packages: |
ospsuite.utils=github::Open-Systems-Pharmacology/OSPSuite.RUtils
tlf=github::Open-Systems-Pharmacology/TLF-Library
test-coverage:
if: ${{ always() }}
needs: [R-CMD-Check]
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/test-pkg-and-coverage.yml@main
with:
install-pksim: true
install-rClr: true
extra-packages: |
ospsuite.utils=github::Open-Systems-Pharmacology/OSPSuite.RUtils
tlf=github::Open-Systems-Pharmacology/TLF-Library
pkgdown:
if: ${{ always() }}
needs: [R-CMD-Check]
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/pkgdown.yml@main
with:
install-pksim: true
install-rClr: true
extra-packages: |
ospsuite.utils=github::Open-Systems-Pharmacology/OSPSuite.RUtils
tlf=github::Open-Systems-Pharmacology/TLF-Library
93 changes: 47 additions & 46 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
# History files
.Rhistory
.Rapp.history

deploy/

packages/

temp/

tests/playground/

# Session Data files
.RData

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
/*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

# Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html
rsconnect/
doc
Meta
# History files
.Rhistory
.Rapp.history

deploy/

packages/

temp/

tests/playground/

# Session Data files
.RData

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
/*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

# Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html
rsconnect/
doc
Meta
docs
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: ospsuite
Title: R package to manipulate OSPSuite Models
Version: 12.0.0
Version: 12.0.0.9000
Authors@R:
c(person("Open-Systems-Pharmacology Community", role = "cph"),
person("Michael", "Sevestre", role = c("aut", "cre"), email = "michael@design2code.ca"),
Expand All @@ -20,10 +20,10 @@ BugReports:
https://github.com/open-systems-pharmacology/ospsuite-r/issues
Depends:
R (>= 3.6),
rClr (>= 0.9.1)
rClr (>= 0.9.1),
Imports:
dplyr (>= 1.0.0),
ospsuite.utils (>= 1.4.0),
ospsuite.utils (>= 1.5.0),
purrr,
readr,
stringr,
Expand Down Expand Up @@ -140,3 +140,6 @@ Collate:
'value-point.R'
'zzz.R'
'zzz_deprecated.R'
Remotes:
Open-Systems-Pharmacology/OSPSuite.RUtils,
Open-Systems-Pharmacology/TLF-Library
13 changes: 2 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,8 @@ knitr::opts_chunk$set(
# OSPSuite-R

<!-- badges: start -->

<a href="https://github.com/Open-Systems-Pharmacology/OSPSuite-R/releases/latest" class="pkgdown-devel">
<img src="https://img.shields.io/github/downloads/Open-Systems-Pharmacology/OSPSuite-R/latest/total?label=%E2%AD%B3%20Downloads%20latest%20release"/></a>
<a href="https://github.com/Open-Systems-Pharmacology/OSPSuite-R/releases" class="pkgdown-devel">
<img src="https://img.shields.io/github/downloads/Open-Systems-Pharmacology/OSPSuite-R/total?label=%E2%AD%B3%20Downloads%20total"/></a>
<br>
<a href="https://ci.appveyor.com/project/open-systems-pharmacology-ci/OSPSuite-R/branch/develop" class="pkgdown-devel">
<img src="https://ci.appveyor.com/api/projects/status/github/Open-Systems-Pharmacology/OSPSuite-R?branch=develop&amp;svg=true" alt="AppVeyor build status"/></a>
<a href="https://app.codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R" class="pkgdown-devel">
<img src="https://codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R/branch/develop/graph/badge.svg" alt="codecov"/></a>

[![R-CMD-check](https://github.com/Open-Systems-Pharmacology/OSPSuite-R/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Open-Systems-Pharmacology/OSPSuite-R/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R/branch/develop/graph/badge.svg)](https://app.codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R?branch=develop)
<!-- badges: end -->

# Overview
Expand Down
44 changes: 19 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@

<!-- badges: start -->

<a href="https://github.com/Open-Systems-Pharmacology/OSPSuite-R/releases/latest" class="pkgdown-devel">
<img src="https://img.shields.io/github/downloads/Open-Systems-Pharmacology/OSPSuite-R/latest/total?label=%E2%AD%B3%20Downloads%20latest%20release"/></a>
<a href="https://github.com/Open-Systems-Pharmacology/OSPSuite-R/releases" class="pkgdown-devel">
<img src="https://img.shields.io/github/downloads/Open-Systems-Pharmacology/OSPSuite-R/total?label=%E2%AD%B3%20Downloads%20total"/></a>
<br>
<a href="https://ci.appveyor.com/project/open-systems-pharmacology-ci/OSPSuite-R/branch/develop" class="pkgdown-devel">
<img src="https://ci.appveyor.com/api/projects/status/github/Open-Systems-Pharmacology/OSPSuite-R?branch=develop&amp;svg=true" alt="AppVeyor build status"/></a>
<a href="https://app.codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R" class="pkgdown-devel">
<img src="https://codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R/branch/develop/graph/badge.svg" alt="codecov"/></a>

[![R-CMD-check](https://github.com/Open-Systems-Pharmacology/OSPSuite-R/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Open-Systems-Pharmacology/OSPSuite-R/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R/branch/develop/graph/badge.svg)](https://app.codecov.io/gh/Open-Systems-Pharmacology/OSPSuite-R?branch=develop)
<!-- badges: end -->

# Overview
Expand Down Expand Up @@ -127,21 +120,22 @@ When installing from such files, the CRAN dependencies need to be
installed manually first.

``` r
# Install dependencies (e.g. R6) which are on CRAN
install.packages("data.table")
install.packages("dplyr")
install.packages("ggplot2")
install.packages("ggtext")
install.packages("jsonlite")
install.packages("lifecycle")
install.packages("patchwork")
install.packages("purrr")
install.packages("R6")
install.packages("readr")
install.packages("rlang")
install.packages("stringr")
install.packages("tidyr")
install.packages("xml2")
# Install dependencies (e.g. R6) which are on CRAN
install.packages("data.table")
install.packages("dplyr")
install.packages("ggplot2")
install.packages("ggtext")
install.packages("jsonlite")
install.packages("lifecycle")
install.packages("openxlsx")
install.packages("patchwork")
install.packages("purrr")
install.packages("R6")
install.packages("readr")
install.packages("rlang")
install.packages("stringr")
install.packages("tidyr")
install.packages("xml2")
```

#### Install non-CRAN dependencies
Expand Down
56 changes: 0 additions & 56 deletions appveyor-3.6.yml

This file was deleted.

Loading

0 comments on commit c8d202b

Please sign in to comment.