diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..7bb7ee9 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,25 @@ +name: Test EC3 + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out the codebase. + uses: actions/checkout@v4 + + - name: Set up Python 3. + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install dependencies + run: python -m pip install mock ply requests PyYAML jsonschema + + - name: Unit tests + run: python -m unittest discover -v -s test -p '*.py' diff --git a/IM2/radl/radl_schema.json b/IM2/radl/radl_schema.json index fb6f761..ea869c6 100644 --- a/IM2/radl/radl_schema.json +++ b/IM2/radl/radl_schema.json @@ -44,6 +44,9 @@ "items": { "type": "array", "items" : { "$ref": "#/definitions/contextualizeItem" } + }, + "options": { + "type": "object" } }, "additionalProperties": false, diff --git a/test/test_radl.py b/test/test_radl.py index b072bd9..90d5025 100644 --- a/test/test_radl.py +++ b/test/test_radl.py @@ -355,7 +355,6 @@ def test_contextualize_options(self): self.assertEqual(r.get(contextualize()).options['ansible_version'].operator, '<=') radl_json = dump_radl_json(r) - print(radl_json) r = parse_radl_json(radl_json) r.check() self.assertEqual(len(r.get(contextualize()).options), 1)