Skip to content

R-test

R-test #59

Workflow file for this run

name: R-test
on:
push:
branches:
[main, dev]
pull_request:
branches:
[main]
schedule:
- cron: '11 1 1 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
R-test:
name: python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
REPO_NAME: ${{ github.event.repository.name }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
- os: windows-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v3
- name: Install/set-up conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: true
activate-environment: ""
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
#- uses: r-lib/actions/setup-renv@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install testing pkgs
run: |
conda install pytest
conda install geopandas>=0.10.2, <0.13
conda install numpy<2.0
conda install pandas<2.0
conda install pint>=0.18
conda install dataretrieval>=1.0, <1.0.5
conda install requests
- name: Run env using R reticulate
run: |
install.packages(c("knitr", "rmarkdown", "reticulate"))
reticulate::import("harmonize_wq")
shell: Rscript {0}
- name: Render-rmd
run: |
echo "Rendering the page..."
Rscript -e 'rmarkdown::render(input = "demos/harmonize_Pensacola.Rmd")'
- name: Run pytest
run: pytest -v harmonize_wq