Split ci.yml
into separate actions
#16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: flepicommon-ci | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- flepimop/R_packages/flepicommon/**/* | |
branches: | |
- main | |
- dev | |
pull_request: | |
paths: | |
- flepimop/R_packages/flepicommon/**/* | |
branches: | |
- main | |
- dev | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
R-version: ["4.3.3"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Setup R ${{ matrix.R-version }} | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.R-version }} | |
- name: Build flepicommon | |
run: | | |
R CMD build flepimop/R_packages/flepicommon/ | |
shell: bash | |
- name: Install Dependencies And flepicommon | |
run: | | |
files <- list.files() | |
pkg <- files[startsWith(files, "flepicommon_")] | |
install.packages(pkg, dependencies = TRUE) | |
install.packages("devtools") | |
packageVersion("flepicommon") | |
shell: Rscript {0} | |
- name: Run Unit Tests | |
run: | | |
setwd("flepimop/R_packages/flepicommon") | |
library(devtools) | |
devtools::test(stop_on_failure = TRUE) | |
shell: Rscript {0} |