Skip to content

Commit f6b7087

Browse files
authored
Merge pull request #33 from arduino/schema
Add YAML Schema validation
2 parents add146d + 3361810 commit f6b7087

File tree

3 files changed

+55
-16
lines changed

3 files changed

+55
-16
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
name: 'Yamllint GitHub Actions'
1+
name: 'YAML Validation'
22
on:
33
- pull_request
44
jobs:
5-
yamllint:
6-
name: 'Yamllint'
5+
validate:
6+
name: 'Validate YAML'
77
runs-on: ubuntu-latest
88
steps:
99
- name: 'Checkout'
1010
uses: actions/checkout@master
11-
- name: 'Yamllint'
11+
- name: 'Run Yamllint'
1212
uses: karancode/yamllint-github-action@master
1313
with:
1414
yamllint_file_or_dir: 'package-list.yaml'
1515
yamllint_strict: false
1616
yamllint_comment: true
1717
yamllint_config_filepath: 'yamllint-config.yml'
1818
env:
19-
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
- name: 'Schema Validation'
21+
run: |
22+
npm i -g yaml-schema-validator
23+
schema validate -e -f package-list.yaml -s schema.yml

package-list.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ packages:
5959
author: Arduino
6060
description: A Python client for the Arduino IoT cloud, which runs on both CPython and MicroPython.
6161
tags: ["cloud", "iot"]
62-
required_runtime: ">=1.22.0"
62+
required_runtime_version: ">=1.22.0"
6363
verification:
6464
- fqbn: "arduino:mbed_portenta:envie_m7"
6565
library_version: "0.0.7"
66-
micropython_version: "1.19.1"
66+
runtime_version: "1.19.1"
6767
tester: "arduino"
6868
license: Mozilla Public License Version 2.0
6969
- name: BME680-Micropython
@@ -78,7 +78,7 @@ packages:
7878
verification:
7979
- fqbn: "arduino:mbed_nano:nanorp2040connect"
8080
library_version: null
81-
micropython_version: "1.19.1"
81+
runtime_version: "1.19.1"
8282
tester: "arduino"
8383
- name: micropython-my9221
8484
author: Mike Causer
@@ -91,7 +91,7 @@ packages:
9191
verification:
9292
- fqbn: "arduino:mbed_nano:nanorp2040connect"
9393
library_version: null
94-
micropython_version: "1.19.1"
94+
runtime_version: "1.19.1"
9595
tester: "arduino"
9696
- name: micropython-rotary
9797
url: https://github.com/miketeachman/micropython-rotary
@@ -101,12 +101,13 @@ packages:
101101
verification:
102102
- fqbn: "arduino:mbed_nano:nanorp2040connect"
103103
library_version: null
104-
micropython_version: "1.19.1"
104+
runtime_version: "1.19.1"
105105
tester: "arduino"
106106
license: MIT License
107107
- name: micropython_servo_pdm
108108
author: Taras Prokofiev
109109
url: https://github.com/TTitanUA/micropython_servo_pdm
110+
description: A MicroPython library for controlling servos using PDM (Pulse Density Modulation) on the Raspberry Pi Pico.
110111
tags: ["servo"]
111112
package_descriptor:
112113
urls:
@@ -118,7 +119,7 @@ packages:
118119
verification:
119120
- fqbn: "arduino:mbed_nano:nanorp2040connect"
120121
library_version: null
121-
micropython_version: "1.19.1"
122+
runtime_version: "1.19.1"
122123
tester: "arduino"
123124
license: MIT License
124125
- name: picoservo
@@ -156,7 +157,7 @@ packages:
156157
verification:
157158
- fqbn: "arduino:mbed_nano:nanorp2040connect"
158159
library_version: null
159-
micropython_version: "1.19.1"
160+
runtime_version: "1.19.1"
160161
tester: "arduino"
161162
license: MIT License
162163
- name: MAX30102-MicroPython-driver
@@ -230,7 +231,7 @@ packages:
230231
verification:
231232
- fqbn: "arduino:mbed_nano:nanorp2040connect"
232233
library_version: "1.3.0"
233-
micropython_version: "1.19.1"
234+
runtime_version: "1.19.1"
234235
tester: "arduino"
235236
- name: MicroPython-Button
236237
author: Ubi de Feo
@@ -240,7 +241,7 @@ packages:
240241
verification:
241242
- fqbn: "arduino:mbed_nano:nanorp2040connect"
242243
library_version: null
243-
micropython_version: "1.19.1"
244+
runtime_version: "1.19.1"
244245
tester: "arduino"
245246
- name: micropython-max7219
246247
url: https://github.com/mcauser/micropython-max7219
@@ -269,11 +270,11 @@ packages:
269270
verification:
270271
- fqbn: "arduino:esp32:nano_nora"
271272
library_version: "3.4.2"
272-
micropython_version: "1.20.0"
273+
runtime_version: "1.20.0"
273274
tester: "arduino"
274275
- fqbn: "esp32:esp32:esp32s3"
275276
library_version: "3.4.2"
276-
micropython_version: "1.20.0"
277+
runtime_version: "1.20.0"
277278
tester: "arduino"
278279
- name: ucPack-mpy
279280
url: https://github.com/arduino/ucPack-mpy

schema.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
packages:
3+
- name:
4+
type: string
5+
required: true
6+
url:
7+
type: string
8+
required: true
9+
description:
10+
type: string
11+
required: true
12+
author:
13+
type: string
14+
required: true
15+
tags:
16+
- type: string
17+
required_runtime_version:
18+
type: string
19+
license:
20+
type: string
21+
docs:
22+
type: string
23+
package_descriptor:
24+
urls:
25+
- - type: string
26+
verification:
27+
- fqbn:
28+
type: string
29+
library_version:
30+
type: string
31+
runtime_version:
32+
type: string
33+
tester:
34+
type: string

0 commit comments

Comments
 (0)