feat: check manifests against schema (#1965)
This commit is contained in:
committed by
GitHub
parent
9c9348816c
commit
01ec5f4179
@@ -0,0 +1,16 @@
|
||||
name: Check Schema
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'index/**.toml'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
uses: ./.github/workflows/check-with-script.yml
|
||||
with:
|
||||
name: Schema
|
||||
script: check-schema.sh
|
||||
script_arg: alire/schemas/manifest-schema.yaml
|
||||
setup_python: true
|
||||
fetch_schema: true
|
||||
@@ -20,11 +20,22 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
setup_python:
|
||||
description: Whether to set up Python and install requirements.txt
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
fetch_schema:
|
||||
description: Whether to clone the Alire repo (manifest JSON Schema)
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
CHECKS_ORG: alire-project
|
||||
CHECKS_REPO: alire-index-checks
|
||||
ALR_VERSION: 2.1.1
|
||||
SCHEMA_REPO: https://github.com/alire-project/alire
|
||||
|
||||
jobs:
|
||||
check:
|
||||
@@ -51,6 +62,22 @@ jobs:
|
||||
with:
|
||||
version: ${{env.ALR_VERSION}}
|
||||
|
||||
- name: Set up Python
|
||||
if: inputs.setup_python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install Python dependencies
|
||||
if: inputs.setup_python
|
||||
run: pip install -r ${{env.CHECKS_REPO}}/requirements.txt
|
||||
shell: bash
|
||||
|
||||
- name: Fetch manifest schema
|
||||
if: inputs.fetch_schema
|
||||
run: git clone --depth 1 "$SCHEMA_REPO" alire
|
||||
shell: bash
|
||||
|
||||
- name: Run check
|
||||
run: >
|
||||
${{env.CHECKS_REPO}}/scripts/${{inputs.script}}
|
||||
|
||||
@@ -15,4 +15,4 @@ url = "git+https://github.com/alire-project/libhello.git"
|
||||
|
||||
# We use this crate as a trigger to conveniently test minor changes to
|
||||
# metaprocesses of the CI of the repository itself.
|
||||
# Last touch: 2026-06-02 17:13 CEST
|
||||
# Last touch: 2026-06-10 00:32 CEST
|
||||
|
||||
Reference in New Issue
Block a user