Skip to content

Commit

Permalink
Merge pull request #32 from davidycliao/0.0.6
Browse files Browse the repository at this point in the history
Update r_ubuntu.yaml
  • Loading branch information
davidycliao authored Nov 15, 2023
2 parents 64aafaf + 3a95b30 commit ee6f994
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions .github/workflows/r_ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


name: R-ubuntu

on:
Expand All @@ -21,46 +19,24 @@ jobs:
- name: Cache R dependencies
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: ${{ runner.os }}-renv-
path: ~/R/library
key: ${{ runner.os }}-r-${{ hashFiles('**/renv.lock') }}
restore-keys: ${{ runner.os }}-r-

# Setup R
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
extra-packages: rcmdcheck
use-public-rspm: true

# Restore R environment using renv
- name: Restore R environment
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
# Install Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

# Create a Python virtual environment
- name: Set up Python venv
run: |
python -m venv env
source env/bin/activate
which python
# Install necessary Python packages
- name: Install Python dependencies
run: |
source env/bin/activate
pip install flair
# Check the R package
- name: Check R package
run: |
source env/bin/activate
R CMD build . --no-build-vignettes
# R CMD check *tar.gz --as-cran
# R CMD check *tar.gz

0 comments on commit ee6f994

Please sign in to comment.