Skip to content

add Emil (#71)

add Emil (#71) #295

name: Validate team member ID card
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
validate-team-member-id:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
install-r: false
use-public-rspm: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
- uses: r-lib/actions/setup-renv@v2
- name: Validate yml files
run: |
library(magrittr)
schema <- "_data/team/_schema.yml" %>%
yaml::read_yaml() %>%
jsonlite::toJSON(auto_unbox = TRUE)
fs::dir_ls("_data/team", regexp = "\\w+\\-\\w+\\.yml") %>%
purrr::map(yaml::read_yaml) %>%
purrr::map(jsonlite::toJSON, auto_unbox = TRUE) %>%
purrr::map(
jsonvalidate::json_validate, schema, engine = "ajv", error = TRUE,
greedy = TRUE, verbose = TRUE
)
shell: Rscript {0}