Skip to content

Commit

Permalink
Attempt to speed up flepicommon CI
Browse files Browse the repository at this point in the history
Test run at speeding up the flepicommon CI compared to using the default
r-lib/actions by doing only the required work for tests manually.
  • Loading branch information
TimothyWillard committed Oct 16, 2024
1 parent 07d93cd commit a4c4b3a
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/flepicommon-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,32 @@ jobs:
lfs: true
- name: Setup R ${{ matrix.R-version }}
uses: r-lib/actions/setup-r@v2
- name: Install Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::devtools
working-directory: 'flepimop/R_packages/flepicommon'
r-version: ${{ matrix.R-version }}
rtools-version: '42'
update-rtools: true
- name: Build flepicommon
run: |
R CMD build flepimop/R_packages/flepicommon/
shell: bash
- name: Install Dependencies
run: |
files <- list.files()
pkg <- files[startsWith(files, "flepicommon_")]
install.packages(pkg, dependencies=TRUE)
install.packages("testthat")
shell: Rscript {0}
- name: Install flepicommon
run: |
TAR_GZ=$( find . -maxdepth 1 -regex ".*flepicommon.*" -printf "%P\n" )
echo "-"
R CMD install --version
echo "-"
R CMD install --help
echo "-"
R CMD install --install-tests $TAR_GZ
- name: Run Unit Tests
run: |
library(devtools)
setwd("flepimop/R_packages/flepicommon")
devtools::test(stop_on_failure=TRUE)
library(testthat)
test_package("flepicommon")
shell: Rscript {0}

0 comments on commit a4c4b3a

Please sign in to comment.