From 5110119cbf230ceb49ed3d9bbe7d7a2386cbc415 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Thu, 21 Mar 2024 13:21:20 +0000 Subject: [PATCH] more changes --- .github/workflows/ci.yml | 117 +++++++++++++++-------------- hdr_schemata/tests/test_schemas.py | 1 + 2 files changed, 60 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c8a838..a28db2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,61 +3,62 @@ name: Pytest on: [push] jobs: - check_json: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Check JSON - run: | - file_path="available.json" - if [ -f "$file_path" ]; then - if jq . "$file_path" >/dev/null 2>&1; then - echo "JSON file is valid." - else - echo "JSON file is not valid." - exit 1 - fi - else - echo "JSON file does not exist." - exit 1 - fi - - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: Install schema module - run: | - python -m pip install --upgrade pip - python -m pip install setuptools - python -m pip install -e . - - - name: Run pytest - run: | - cd hdr_schemata/tests/ - pytest - deploy: - runs-on: ubuntu-latest - needs: test - if: success() && github.ref == 'refs/heads/master' - steps: - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - uses: actions/checkout@v2 - with: - submodules: "recursive" - - run: pip3 install -r requirements.txt - - name: deploy - run: | - mkdocs gh-deploy --force + check_json: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check JSON + run: | + file_path="available.json" + if [ -f "$file_path" ]; then + if jq . "$file_path" >/dev/null 2>&1; then + echo "JSON file is valid." + else + echo "JSON file is not valid." + exit 1 + fi + else + echo "JSON file does not exist." + exit 1 + fi + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install schema module + run: | + python -m pip install --upgrade pip + python -m pip install setuptools + python -m pip install -e . + python -m pip install -r requirements.txt + + - name: Run pytest + run: | + cd hdr_schemata/tests/ + pytest + deploy: + runs-on: ubuntu-latest + needs: test + if: success() && github.ref == 'refs/heads/master' + steps: + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - uses: actions/checkout@v2 + with: + submodules: "recursive" + - run: pip3 install -r requirements.txt + - name: deploy + run: | + mkdocs gh-deploy --force diff --git a/hdr_schemata/tests/test_schemas.py b/hdr_schemata/tests/test_schemas.py index facc3bc..e9679e7 100644 --- a/hdr_schemata/tests/test_schemas.py +++ b/hdr_schemata/tests/test_schemas.py @@ -55,6 +55,7 @@ def test_json_schema(self): "title", "type", ] + print("here in TestGwdm10") print(expected_keys) print(list(schema.keys()))