diff --git a/.github/workflows/flepicommon-ci.yml b/.github/workflows/flepicommon-ci.yml index 04c76ddce..74980fc23 100644 --- a/.github/workflows/flepicommon-ci.yml +++ b/.github/workflows/flepicommon-ci.yml @@ -28,14 +28,23 @@ jobs: lfs: true - name: Setup R ${{ matrix.R-version }} uses: r-lib/actions/setup-r@v2 + - name: Build flepicommon + run: | + R CMD BUILD flepimop/R_packages/flepicommon/ + shell: bash - name: Install Dependencies - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::devtools - working-directory: 'flepimop/R_packages/flepicommon' + 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" ) + 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}