Skip to content

Add YAML Schema validation #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 10, 2025
Merged
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
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: 'Yamllint GitHub Actions'
name: 'YAML Validation'
on:
- pull_request
jobs:
yamllint:
name: 'Yamllint'
validate:
name: 'Validate YAML'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Yamllint'
- name: 'Run Yamllint'
uses: karancode/yamllint-github-action@master
with:
yamllint_file_or_dir: 'package-list.yaml'
yamllint_strict: false
yamllint_comment: true
yamllint_config_filepath: 'yamllint-config.yml'
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Schema Validation'
run: |
npm i -g yaml-schema-validator
schema validate -e -f package-list.yaml -s schema.yml
23 changes: 12 additions & 11 deletions package-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ packages:
author: Arduino
description: A Python client for the Arduino IoT cloud, which runs on both CPython and MicroPython.
tags: ["cloud", "iot"]
required_runtime: ">=1.22.0"
required_runtime_version: ">=1.22.0"
verification:
- fqbn: "arduino:mbed_portenta:envie_m7"
library_version: "0.0.7"
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
license: Mozilla Public License Version 2.0
- name: BME680-Micropython
Expand All @@ -78,7 +78,7 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: null
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
- name: micropython-my9221
author: Mike Causer
Expand All @@ -91,7 +91,7 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: null
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
- name: micropython-rotary
url: https://github.com/miketeachman/micropython-rotary
Expand All @@ -101,12 +101,13 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: null
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
license: MIT License
- name: micropython_servo_pdm
author: Taras Prokofiev
url: https://github.com/TTitanUA/micropython_servo_pdm
description: A MicroPython library for controlling servos using PDM (Pulse Density Modulation) on the Raspberry Pi Pico.
tags: ["servo"]
package_descriptor:
urls:
Expand All @@ -118,7 +119,7 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: null
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
license: MIT License
- name: picoservo
Expand Down Expand Up @@ -156,7 +157,7 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: null
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
license: MIT License
- name: MAX30102-MicroPython-driver
Expand Down Expand Up @@ -230,7 +231,7 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: "1.3.0"
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
- name: MicroPython-Button
author: Ubi de Feo
Expand All @@ -240,7 +241,7 @@ packages:
verification:
- fqbn: "arduino:mbed_nano:nanorp2040connect"
library_version: null
micropython_version: "1.19.1"
runtime_version: "1.19.1"
tester: "arduino"
- name: micropython-max7219
url: https://github.com/mcauser/micropython-max7219
Expand Down Expand Up @@ -269,11 +270,11 @@ packages:
verification:
- fqbn: "arduino:esp32:nano_nora"
library_version: "3.4.2"
micropython_version: "1.20.0"
runtime_version: "1.20.0"
tester: "arduino"
- fqbn: "esp32:esp32:esp32s3"
library_version: "3.4.2"
micropython_version: "1.20.0"
runtime_version: "1.20.0"
tester: "arduino"
- name: ucPack-mpy
url: https://github.com/arduino/ucPack-mpy
Expand Down
34 changes: 34 additions & 0 deletions schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
packages:
- name:
type: string
required: true
url:
type: string
required: true
description:
type: string
required: true
author:
type: string
required: true
tags:
- type: string
required_runtime_version:
type: string
license:
type: string
docs:
type: string
package_descriptor:
urls:
- - type: string
verification:
- fqbn:
type: string
library_version:
type: string
runtime_version:
type: string
tester:
type: string
Loading