forked from huggingface/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 Add CI to check YML files (huggingface#909)
- Loading branch information
1 parent
e219e84
commit 4609f0b
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: YAML schema validator | ||
on: | ||
push: | ||
paths: | ||
- "_*.yml" | ||
- "schemas/_*.schema.yml" | ||
|
||
jobs: | ||
yaml-schema-validation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Validate _events.yml" | ||
uses: nrkno/yaml-schema-validator-github-action@v4 | ||
with: | ||
schema: schemas/_events.schema.yml | ||
target: _events.yml | ||
- name: "Validate _blog.yml" | ||
uses: nrkno/yaml-schema-validator-github-action@v4 | ||
with: | ||
schema: schemas/_blog.schema.yml | ||
target: _blog.yml | ||
- name: "Validate _tags.yml" | ||
uses: nrkno/yaml-schema-validator-github-action@v4 | ||
with: | ||
schema: schemas/_tags.schema.yml | ||
target: _tags.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
list(include('blog')) | ||
--- | ||
# It's possible to use regex to validate dates like June 8, 2020 or a whole lot of other things, if needed | ||
blog: | ||
local: str(required=False) | ||
external: str(required=False) | ||
title: str() | ||
thumbnail: str(required=False) | ||
author: str() | ||
guest: bool(required=False) | ||
date: str() | ||
tags: list(str()) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
list(include('event')) | ||
--- | ||
event: | ||
name: str() | ||
link: str() | ||
date: str() | ||
date_formatted: str(required=False) | ||
description: str() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
list(include('tag')) | ||
--- | ||
tag: | ||
value: str() | ||
label: str() |