Skip to content

Update testManualInputs.yml #19

Update testManualInputs.yml

Update testManualInputs.yml #19

### https://github.com/actions/upload-artifact
### https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows/
### https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
### https://github.com/r-lib/actions/tree/v2/setup-r-dependencies
### https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution
### For uploading artifacts:
### "path:" is the output path where Pandoc will write the compiled PDF.
### Note, this should be the same directory as the input paper.md
name: Compile main FrEDI Data
on: [push]
# on:
# push:
# inputs:
# update:
# type: choice
# description: Update sysdata.rda
# options:
# - no
# - yes
jobs:
compile_data:
runs-on: ubuntu-latest
name: Process Data
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Setup R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
cache-version: 1
packages: |
any::tidyverse
any::openxlsx
- name: Run createsystemData
run: |
Rscript -e 'require(tidyverse)'
Rscript -e 'getwd() |> print()'
Rscript -e '"." |> list.files()'
Rscript -e '"./scripts" |> list.files()'
Rscript -e 'source("./scripts/createSystemData_main.R")'
- name: Upload Tests
uses: actions/upload-artifact@v3
with:
name: Data
path: |
./data_tests/
./data/tmp_sysdata.rda
# - name: Update Data
# if: github.event.inputs.update == 'yes'
# run: |
# Rscript -e 'file.copy(from="./data/tmp_sysdata.rda", to="./data/sysdata.rda")'
# Rscript -e 'file.remove("./data/tmp_sysdata.rda")'
# - name: Commit results
# run: |
# git config --local core.autocrlf false
# git config --local user.email "${{ github.actor }}@users.noreply.github.com"
# git config --local user.name "${{ github.actor }}"
# git add data/sysdata**
# git pull origin ${{ github.head_ref }} --autostash --rebase -X ours
# git commit -a -m "Compiled main FrEDI data"
# git push