diff --git a/.github/workflows/test_r.yaml b/.github/workflows/test_r.yaml index 4eb5990..3418617 100644 --- a/.github/workflows/test_r.yaml +++ b/.github/workflows/test_r.yaml @@ -28,14 +28,11 @@ jobs: python-version: "3.9" steps: - uses: actions/checkout@v3 - - - name: Install/set-up conda - uses: conda-incubator/setup-miniconda@v3 + + - name: setup python + uses: actions/setup-python@v4 with: - auto-update-conda: true - python-version: ${{ matrix.python-version }} - auto-activate-base: true - activate-environment: "" + python-version: ${{ matrix.config.python }} - name: Set up R uses: r-lib/actions/setup-r@v2 @@ -45,22 +42,25 @@ jobs: #- 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 + - name: R depends + shell: Rscript {0} run: | install.packages(c("knitr", "rmarkdown", "reticulate")) - reticulate::import("harmonize_wq") + + - name: setup r-reticulate venv shell: Rscript {0} + run: | + library(reticulate) + + path_to_venv <- virtualenv_create( + envname = "r-reticulate", + python = Sys.which("python"), # placed on PATH by the setup-python action + packages = c( + "pytest", "numpy<2.0", "pandas<2.0", "geopandas>=0.10.2, <0.13", "pint>=0.18", + "dataretrieval>=1.0, <1.0.5", "requests" + ) + ) - name: Render-rmd run: |