Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/schedule-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Validate MMED's schedule data (#54) with the SHARED validator, via pre-commit.
#
# MMED keeps its own schedule data in _data/schedule/mmed/<year>.yml. The validation
# logic (schema, referential checks, role tokens) lives once in ICI3D.github.io and is
# pulled in as a pinned pre-commit hook (.pre-commit-config.yaml) — the SAME hook
# contributors run locally with `pre-commit install`. People records still come from
# the ICI3D.github.io submodule for now (see the hook's --people-dir).
name: Validate schedule data

on:
pull_request:
paths:
- '_data/schedule/**'
- '.pre-commit-config.yaml'
push:
branches: ['gh-pages']
paths:
- '_data/schedule/**'
- '.pre-commit-config.yaml'
workflow_dispatch:

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout (with the ICI3D.github.io submodule = shared people records)
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: pre-commit/action@v3.0.1
with:
extra_args: validate-schedule --all-files
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Validate MMED's schedule data against the shared, versioned ICI3D schema.
#
# The validator, JSON Schema, and role vocabulary live once in ICI3D.github.io and
# are pulled in here as a pinned pre-commit hook (no vendoring). Contributors get the
# same check CI runs, locally on every commit:
#
# pip install pre-commit && pre-commit install
#
# Instructor keys resolve against the shared people records from the ICI3D.github.io
# submodule (--people-dir), the same records the Jekyll build reads. When MMED owns
# its own _data/team, drop the submodule and the --people-dir override.
repos:
# INTERIM: points at the fork branch until ICI3D/ICI3D.github.io#59 merges; then
# flip repo -> https://github.com/ICI3D/ICI3D.github.io and rev -> the merge sha/tag.
- repo: https://github.com/WestonVoglesonger/ICI3D.github.io
rev: 271a817244057f0b90fb64a2724e645b20827099
hooks:
- id: validate-schedule
args: [--people-dir, ICI3D.github.io/_data/team]
Loading