Skip to content

Final preparations for cchsflow v3 #54

Final preparations for cchsflow v3

Final preparations for cchsflow v3 #54

Workflow file for this run

name: Check CSV Formatting
on:
pull_request:
paths:
- 'inst/extdata/variables.csv'
- 'inst/extdata/variable_details.csv'
push:
branches:
- main
paths:
- 'inst/extdata/variables.csv'
- 'inst/extdata/variable_details.csv'
jobs:
check-csv-formatting:
runs-on: ubuntu-latest
name: Validate CSV worksheet formatting
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Set up R
uses: r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590
with:
r-version: 'release'
- name: Install package dependencies
uses: r-lib/actions/setup-r-dependencies@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590
with:
# devtools is required by exec/check-worksheets.R (load_all from a
# repo checkout); without it the job fails before any CSV check runs
extra-packages: |
local::.
any::devtools
- name: Check CSV formatting
run: Rscript exec/check-worksheets.R
- name: Suggest fix command on failure
if: failure()
run: |
echo "::error::CSV check failed. If the log above shows formatting violations, run 'Rscript exec/fix-worksheets.R' locally. If it shows a package/setup error, the worksheets were not actually checked - fix the workflow environment first."