diff --git a/.github/workflows/yamllint.yml b/.github/workflows/validate-yaml.yml similarity index 55% rename from .github/workflows/yamllint.yml rename to .github/workflows/validate-yaml.yml index e5e378f..2e10d40 100644 --- a/.github/workflows/yamllint.yml +++ b/.github/workflows/validate-yaml.yml @@ -1,14 +1,14 @@ -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' @@ -16,4 +16,8 @@ jobs: yamllint_comment: true yamllint_config_filepath: 'yamllint-config.yml' env: - GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + 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 \ No newline at end of file diff --git a/package-list.yaml b/package-list.yaml index bc5a7fd..b1e83f8 100644 --- a/package-list.yaml +++ b/package-list.yaml @@ -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 @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/schema.yml b/schema.yml new file mode 100644 index 0000000..2fcf749 --- /dev/null +++ b/schema.yml @@ -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 \ No newline at end of file