Skip to content

Commit

Permalink
Merge pull request #377 from Olink-Proteomics/optimization_develop_re…
Browse files Browse the repository at this point in the history
…ad_npx_to_main

Optimization develop read npx to main
  • Loading branch information
klevdiamanti authored May 31, 2024
2 parents 87a4d7f + da9c1b8 commit 05a9e50
Show file tree
Hide file tree
Showing 511 changed files with 46,121 additions and 400,184 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^LICENSE\.md$
/revdep/
/revdep/
^\.github$
2 changes: 1 addition & 1 deletion .github/workflows/CRAN_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
120 changes: 17 additions & 103 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
# Required as the JSON input file needs to be read
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: set-matrix
uses: JoshuaTheMiller/conditional-build-matrix@main
uses: JoshuaTheMiller/conditional-build-matrix@main
with:
inputFile: '.github/workflows/matrix_config_check.json'
inputFile: '.github/workflows/matrix_config_check.json'
filter: '[?runOn==`${{ github.event_name }}` || runOn==`always`]'
# addInclude: true

R-CMD-check:
needs: matrix_prep
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}

runs-on: ${{ matrix.os }}
timeout-minutes: 120
timeout-minutes: 120

name: ${{ matrix.os }} (${{ matrix.r }})

Expand All @@ -37,119 +37,33 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

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

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.18'


- name: Set BioC version
run: |
install.packages("remotes")
forenv <- paste("R_BIOC_VERSION=", as.character(remotes::bioc_version()), sep = "")
write(forenv, file = Sys.getenv("GITHUB_ENV"), append = TRUE) # Store current value to ENV
write(forenv, file = Sys.getenv("GITHUB_ENV"), append = TRUE) # Store current value to ENV
shell: Rscript {0}


- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: OlinkAnalyze
extra-packages: any::rcmdcheck, pillar

- name: Install Matrix from source
run: |
install.packages("Matrix", type="source", repos='http://cran.us.r-project.org')
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
working-directory: OlinkAnalyze


R-CMD-check-renv:
needs: matrix_prep
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-22.04, r: '4.1.3'}
extra-packages: any::rcmdcheck


runs-on: ${{ matrix.config.os }}
timeout-minutes: 120

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: false
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- name: Install package
- name: Install arrow from r-universe
if: matrix.os == 'macOS-latest'
run: |
sudo apt update
sudo apt-get -y install libglpk-dev texlive-latex-base \
texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.18'

- name: Set RENV_PATHS_ROOT
shell: bash
run: |
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV
- name: Install and activate renv
run: |
install.packages("remotes")
remotes::install_version("renv", "0.16.0")
renv::activate(profile = "r413")
install.packages('arrow', repos = c('https://apache.r-universe.dev'))
shell: Rscript {0}

- name: Get R and OS version
id: get-version
run: |
cat("os-version=", sessionInfo()$running, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
cat("r-version=", R.Version()$version.string, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
shell: Rscript {0}

- name: Restore Renv package cache
uses: actions/cache@v3
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-${{ hashFiles('renv.lock') }}
restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-

- name: Install renv dependencies
run: renv::restore()
shell: Rscript {0}

- name: Check package
run: |
check_results <- rcmdcheck::rcmdcheck(error_on = "error",
path = "OlinkAnalyze",
check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@v3
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: "check"


working-directory: OlinkAnalyze
54 changes: 54 additions & 0 deletions .github/workflows/R-CMD-check_docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
pull_request:
branches:
- 'main'
- 'develop'
- 'optimization_develop'
- 'optimization_main'

name: R-CMD-check-docker

jobs:
R-CMD-check-docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
r_version: ["4.1.3", "4.2.3", "4.3.3"]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Build docker image
uses: docker/build-push-action@v5
with:
push: false
tags: oa:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
file: docker/Dockerfile_for_tests
load: true
build-args: R_VERSION=${{matrix.r_version}}
-
name: Run rcmdcheck
run: |
echo "rcmdcheck::rcmdcheck(path = '/OA', check_dir = '/check', error_on = 'warning')" | docker run -i -v "$(pwd)/OlinkAnalyze":/OA -v "$(pwd)/check":/check oa:latest
-
name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: docker-r${{ matrix.config.r }}-check-results
path: check
60 changes: 60 additions & 0 deletions .github/workflows/R-CMD-check_no-suggests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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
#
# NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends,
# Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never
# installed, with the exception of testthat, knitr, and rmarkdown. The cache is
# never used to avoid accidentally restoring a cache containing a suggested
# dependency.
on:
pull_request:
branches:
- 'main'
- 'develop'
- 'optimization_develop'
- 'optimization_main'

name: R-CMD-check-hard

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- 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@v2
with:
working-directory: OlinkAnalyze
dependencies: '"hard"'
cache: false
extra-packages: |
any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
working-directory: OlinkAnalyze
44 changes: 44 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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:
pull_request:
branches:
- 'main'
- 'develop'
- 'optimization_develop'
- 'optimization_main'

name: lint

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: any::pak

- name: install OA
run: |
pak::pkg_install(c("local::OlinkAnalyze", "lintr", "devtools"))
shell: Rscript {0}

- name: Lint
run: |
options(lintr.github_annotation_project_dir = "OlinkAnalyze")
devtools::load_all(path = "OlinkAnalyze")
lintr::lint_package(path = "OlinkAnalyze")
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
12 changes: 6 additions & 6 deletions .github/workflows/matrix_config_check.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
{
"os": "ubuntu-20.04",
"r": "release",
"runOn": "always"
"runOn": "pull_request"
},
{
"os": "ubuntu-20.04",
"r": "devel",
"runOn": "pull_request"
"os": "ubuntu-22.04",
"r": "release",
"runOn": "always"
},
{
"os": "ubuntu-20.04",
"r": "4.2.0",
"os": "ubuntu-22.04",
"r": "devel",
"runOn": "pull_request"
}
]
7 changes: 4 additions & 3 deletions .github/workflows/render-and-document.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches-ignore:
- 'main'
branches-ignore:
- 'main'
- 'optimization_main'

name: render-and-document

Expand All @@ -17,7 +18,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
Expand Down
Loading

0 comments on commit 05a9e50

Please sign in to comment.