run_ecosis_pull_example #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run_ecosis_pull_example | |
on: | |
schedule: | |
- cron: '15 1 */5 * *' | |
env: | |
R_LIBS_USER: /usr/local/lib/R/site-library | |
LC_ALL: en_US.UTF-8 | |
NCPUS: 2 | |
jobs: | |
run-plsr: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
- name: Query dependencies | |
run: | | |
install.packages('remotes') | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | |
shell: Rscript {0} | |
- name: Install dependencies | |
run: | | |
Rscript -e 'remotes::install_github(repo="TESTgroup-BNL/spectratrait", dependencies=TRUE)' | |
# Run R script | |
- name: Run EcoSIS API Pull Example | |
run: | | |
source("inst/scripts/pull_data_from_ecosis.R") | |
shell: Rscript {0} |