update data #263
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
# This file determines when GitHub Actions (GA) is triggered and if so what | |
# sequence of steps continous integration takes. | |
# | |
# For a video tutorial explaining these steps click: https://youtu.be/JKF6aXtdLHs | |
# When any of these files are modified trigger GAs (except for the ones with a '!'): | |
on: | |
push: | |
paths: | |
- 'raw_data/Field_Maps**' | |
- '!raw_data/README.md' | |
- 'R_scripts/CI_1_Generate_reports.R' | |
- 'R_scripts/GitHubAction_checks.csv' | |
pull_request: | |
paths: | |
- 'raw_data/Field_Maps**' | |
- '!raw_data/README.md' | |
- 'R_scripts/CI_1_Generate_reports.R' | |
- 'R_scripts/GitHubAction_checks.csv' | |
# Name the workflow as it will appear on GA status page | |
# https://github.com/SCBI-ForestGEO/SCBImortality/actions | |
name: data-tests | |
# Here are all the steps GA takes when triggered: | |
jobs: | |
data-tests: | |
# Set the operating system GA assumes: | |
runs-on: windows-latest | |
# Allow only authorized collaborators to trigger GA: | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
# All steps in workflow: | |
steps: | |
# Housekeeping - Import various actions to make process work: | |
- uses: actions/checkout@v3 | |
# Use this action: https://github.com/actions/checkout#checkout-v3 | |
- uses: r-lib/actions/setup-r@v2 | |
# Use this action: https://github.com/r-lib/actions/tree/v2/setup-r | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
# Housekeeping - Run package check (may not be needed): | |
# - name: Check | |
# run: | | |
# options(crayon.enabled = TRUE) | |
# rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") | |
# shell: Rscript {0} | |
# Run R script to generate error reports: | |
- name: Generate reports | |
id: Generate_reports | |
run: | | |
source("R_scripts/CI_1_Generate_reports.R") | |
shell: Rscript {0} | |
# Run R script to update progress map: | |
- name: Update Progress Map | |
id: update_progress_map | |
run: | | |
source("R_scripts/CI_2_progress_map.R") | |
shell: Rscript {0} | |
# Commit and push all new files, where commits are assigned to GA bot: | |
- name: Commit new files | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git pull | |
git add --all | |
git commit -am "add data" | |
git push | |