Skip to content

Commit

Permalink
Merge pull request #363 from Olink-Proteomics/ci_fix_v2
Browse files Browse the repository at this point in the history
Ci fix v2
  • Loading branch information
klevdiamanti committed May 24, 2024
2 parents e0cac06 + 1e63a5d commit 6932023
Show file tree
Hide file tree
Showing 48 changed files with 2,504 additions and 8,857 deletions.
104 changes: 11 additions & 93 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
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 @@ -42,7 +42,7 @@ jobs:
- 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:
Expand All @@ -54,100 +54,18 @@ jobs:
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
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
- name: Install arrow from r-universe
if: matrix.os == 'macOS-latest'
run: |
install.packages("Matrix", type="source", repos='http://cran.us.r-project.org')
install.packages('arrow', repos = c('https://apache.r-universe.dev'))
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'}


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
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")
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
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: "check"
working-directory: OlinkAnalyze
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"
}
]
40 changes: 40 additions & 0 deletions .github/workflows/r-cmd-check-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on: [pull_request]

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", "4.4.0"]
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build docker image
uses: docker/build-push-action@v4
with:
push: false
tags: oa:latest
cache-from: type=gha
cache-to: type=gha,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@main
with:
name: docker-r${{ matrix.config.r }}-check-results
path: check
2 changes: 1 addition & 1 deletion OlinkAnalyze/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@ VignetteBuilder:
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
URL: https://olink.com/ https://github.com/Olink-Proteomics/OlinkRPackage
1 change: 1 addition & 0 deletions OlinkAnalyze/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export(olink_heatmap_plot)
export(olink_lmer)
export(olink_lmer_plot)
export(olink_lmer_posthoc)
export(olink_lod)
export(olink_normalization)
export(olink_normalization_bridge)
export(olink_normalization_n)
Expand Down
3 changes: 2 additions & 1 deletion OlinkAnalyze/R/globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ utils::globalVariables(unique(c(
"umapX_low", "umapY_high", "umapY_low", "LX", "LY", "PCX", "PCY", "rowname", "Normalization", "Quantified_value", "v1",
"v2", "v", "v_name", "duplicateID", "SampleID_df1", "name", "data", "normalize_to", "PlateID1", "QC_Warning1", "V1", "V2",
"cols", "ID", "AssayQC", "AssayType", "Block", "DataAnalysisRefID", "ExploreVersion", "ExtNPX", "PCNormalizedNPX", "SampleQC", "SampleType", "WellID",
"Max LOD", "Plate LOD", "Plate_LOD", "Normalization_df1", "Normalization_df2", "Max_LOD", "maxLOD", "plateLOD"
"Max LOD", "Plate LOD", "Plate_LOD", "Normalization_df1", "Normalization_df2", "Max_LOD", "maxLOD", "plateLOD",
".env", ".data"
)))
Loading

0 comments on commit 6932023

Please sign in to comment.