Skip to content

Commit

Permalink
Remove renv and use cran latest (#176)
Browse files Browse the repository at this point in the history
* add vignettes

* add doc

* use cran latest

* temp comments

* use tmp branch

* fix

* fix

* fix

* add supp packages

* fix typo

* update docker images

* add needs

* fix im name

* update workflow to use latest im

* fix

* delete rprofile

* fix deps name

* add old release

* add old release check

* fix typo

* fix release artifacts

* update install deps script & lintr

* fix link

* fix link

* rename latest image into release

* Update push-docker-image.yml

* install suggest deps

* add step to install deps - r cmd check

* add other r cmd check job

* fix indent

* fix

* try p3m cran repo for devel

* try another cran repo devel

* update boilerplate steps with new deps, upload deps artifacts

* add r_version to artifact

* fix artifact name

* trigger checks only on dispatch, generate renv.lock on artifacts

* fix

* fix

* fix

* fix

* fix artifacts multiple paths

* fix path

* fix

* retry

* fix renv artifact names

---------

Co-authored-by: pharmaverse-bot <[email protected]>
Co-authored-by: cicdguy <[email protected]>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent f7617ba commit a25b02b
Show file tree
Hide file tree
Showing 52 changed files with 1,345 additions and 8,854 deletions.
47 changes: 0 additions & 47 deletions .Rprofile

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/check-r-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Check R tags

on:
workflow_dispatch: # give possibility to run it manually
schedule:
- cron: '0 0 * * Sun' # Run every sunday at midnight UTC

permissions: write-all
env:
REGISTRY: ghcr.io
R_REPOS: "https://cran.r-project.org"
OLD_RELEASE: "4.3"

concurrency:
group: check-r-tags-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-r-release:
runs-on: ubuntu-latest
steps:
- name: List rocker/rstudio tags
run: |
versions=$(curl -s "https://registry.hub.docker.com/v2/repositories/rocker/rstudio/tags/" | grep -o '"name": *"[^"]*' | grep -o '[^"]*$')
r_version=$(echo "$versions" | grep -oE '^[0-9]+\.[0-9]+$' | sort -r | head -n 1)
if [ $r_version != "${{ env.OLD_RELEASE }}" ]
then
echo "NEW RELEASE DETECTED - please update OLD_RELEASE env variable to $r_version in the workflows (this one and push-docker-image)"
exit 1
fi
15 changes: 10 additions & 5 deletions .github/workflows/check-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
- devel
- latest
workflow_call:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: string

Expand Down Expand Up @@ -111,6 +110,12 @@ jobs:
renv-restore: false
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies from DESCRIPTION
run: |
devtools::install(force = TRUE, dependencies = TRUE)
shell: Rscript {0}

##################### END boilerplate steps #####################

- name: Install package
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
- devel
- latest
skip-coverage-badges:
description: 'Skip code coverage badge creation'
default: false
Expand All @@ -19,7 +18,7 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: string
skip-coverage-badges:
Expand Down Expand Up @@ -95,6 +94,11 @@ jobs:
enable-check: false
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies from DESCRIPTION
run: |
devtools::install(force = TRUE, dependencies = TRUE)
shell: Rscript {0}
##################### END boilerplate steps #####################

- name: Run coverage 👟
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/lintr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
- devel
- latest
lint-all-files:
description: 'Lint all files every time'
default: 'false'
Expand All @@ -29,7 +28,7 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: string
lint-all-files:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/man-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
- devel
- latest
workflow_call:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: string

Expand Down Expand Up @@ -80,6 +79,12 @@ jobs:
enable-check: false
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies from DESCRIPTION
run: |
devtools::install(force = TRUE, dependencies = TRUE)
shell: Rscript {0}

##################### END boilerplate steps #####################

- name: Generate man pages
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
- devel
- latest
skip-multiversion-docs:
description: 'Skip creation of multi-version docs'
default: false
Expand Down Expand Up @@ -38,7 +37,7 @@ on:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
default: 'release'
required: false
type: string
skip-multiversion-docs:
Expand Down Expand Up @@ -148,6 +147,12 @@ jobs:
enable-check: false
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies from DESCRIPTION
run: |
devtools::install(force = TRUE, dependencies = TRUE)
shell: Rscript {0}

##################### END boilerplate steps #####################

- name: Install package
Expand Down
Loading

0 comments on commit a25b02b

Please sign in to comment.