Skip to content

Split ci.yml into separate actions #4

Split ci.yml into separate actions

Split ci.yml into separate actions #4

Workflow file for this run

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
- 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" )
R CMD install --install-tests $TAR_GZ
- name: Run Unit Tests
run: |
library(testthat)
test_package("flepicommon")
shell: Rscript {0}