Skip to content

Commit

Permalink
Merge pull request #33 from arduino/schema
Browse files Browse the repository at this point in the history
Add YAML Schema validation
  • Loading branch information
sebromero authored Jan 10, 2025
2 parents add146d + 3361810 commit f6b7087
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 16 deletions.
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

0 comments on commit f6b7087

Please sign in to comment.