Skip to content

Commit

Permalink
modified rhub.yaml for reticulate
Browse files Browse the repository at this point in the history
  • Loading branch information
Malika1109 committed Sep 8, 2024
1 parent cbd65a2 commit fe728bf
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup
# Setup R-hub platforms
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
Expand All @@ -60,6 +60,18 @@ jobs:
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

# Setup Python environment
- uses: actions/setup-python@v4
with:
python-version: "3.x"

# Setup reticulate virtual environment and install Python packages
- name: Setup reticulate virtual environment
run: |
Rscript -e "reticulate::virtualenv_create(envname = 'pytrends-in-r-new', python = Sys.which('python'))"
Rscript -e "reticulate::py_install(c('pandas', 'requests', 'pytrends', 'rich'), envname = 'pytrends-in-r-new')"
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
Expand All @@ -81,14 +93,22 @@ jobs:
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}

# Install Python and setup reticulate virtualenv
- uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Setup reticulate virtual environment
run: |
Rscript -e "reticulate::virtualenv_create(envname = 'pytrends-in-r-new', python = Sys.which('python'))"
Rscript -e "reticulate::py_install(c('pandas', 'requests', 'pytrends', 'rich'), envname = 'pytrends-in-r-new')"
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
Expand Down

0 comments on commit fe728bf

Please sign in to comment.