Skip to content

Commit

Permalink
Merge pull request #341 from Olink-Proteomics/optimization_develop_li…
Browse files Browse the repository at this point in the history
…nt_covr_test

Update covr and lintr CI workflows
arrow does not work on MacOC for now apache/arrow#40667
  • Loading branch information
klevdiamanti authored Apr 18, 2024
2 parents 4270d6e + b1afe2c commit 9719e67
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
# 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
- optimization
- optimization_develop
pull_request:
branches:
- main
- optimization
- optimization_develop
[push]

name: lint

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

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: OlinkAnalyze
extra-packages: lintr
packages: any::pak

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

- name: Lint
run: |
pkgload::load_all(path = "OlinkAnalyze")
lintr::lint_package()
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
24 changes: 11 additions & 13 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# 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
- optimization
- optimization_develop
pull_request:
branches:
- main
- optimization
- optimization_develop
[push]

name: test-coverage

Expand All @@ -21,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 2

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -39,13 +30,20 @@ jobs:
path = "OlinkAnalyze",
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package

0 comments on commit 9719e67

Please sign in to comment.