osbuild: add meta module for metadata information
This new module contains utilities that help to introspect parts that constitute the inner parts of osbuild, i.e. its stages and assembler (which is also considered a type of stage in this context). It contains the `StageInfo` class that can that contains meta-information about the individual stage, such as a short information (`info`), a longer description (`desc`) and its JSON schema. A new Schema class represents schema data and has a `validation` method that can be used to validate that json data conforms to said schema. A `Index` class can be used to obtain `StageInfo` and `Schema` for entities identified via `klass` and `name`. A top level `validate` method is introduced that can validate manifest data. Internally it uses the `jsonschema` package so add that as a requirement and Install this dependency in the CI.
This commit is contained in:
parent
651326c610
commit
e77d95f4b7
5 changed files with 442 additions and 1 deletions
8
.github/workflows/runtime-tests.yml
vendored
8
.github/workflows/runtime-tests.yml
vendored
|
|
@ -31,6 +31,8 @@ jobs:
|
|||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python Packages
|
||||
run: pip install jsonschema
|
||||
- name: "Run Pipeline Tests"
|
||||
run: sudo env "PATH=$PATH" make test-runtime
|
||||
|
||||
|
|
@ -49,6 +51,8 @@ jobs:
|
|||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python Packages
|
||||
run: pip install jsonschema
|
||||
- name: "Run Noop-Pipeline Tests"
|
||||
run: |
|
||||
for i in {0..2} ; do
|
||||
|
|
@ -75,6 +79,8 @@ jobs:
|
|||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python Packages
|
||||
run: pip install jsonschema
|
||||
- name: "Run Assembler Tests"
|
||||
run: sudo env "PATH=$PATH" python3 -m unittest -v test.test_assemblers
|
||||
|
||||
|
|
@ -95,5 +101,7 @@ jobs:
|
|||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python Packages
|
||||
run: pip install jsonschema
|
||||
- name: "Run Stage Tests"
|
||||
run: sudo env "PATH=$PATH" python3 -m unittest -v test.test_stages
|
||||
|
|
|
|||
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
|
|
@ -9,7 +9,7 @@ jobs:
|
|||
container: docker.io/library/python:3.7
|
||||
steps:
|
||||
- name: Install pylint
|
||||
run: pip install pylint==2.4.1
|
||||
run: pip install pylint==2.4.1 jsonschema
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Run pylint
|
||||
|
|
@ -67,6 +67,9 @@ jobs:
|
|||
with:
|
||||
path: osbuild
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pip install jsonschema
|
||||
|
||||
- name: Run test_osbuild
|
||||
run: |
|
||||
cd osbuild
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue