diff --git a/.github/workflows/push-main-image-ghcr.yml b/.github/workflows/push-main-image-ghcr.yml index c9b542d..8e3322e 100644 --- a/.github/workflows/push-main-image-ghcr.yml +++ b/.github/workflows/push-main-image-ghcr.yml @@ -9,10 +9,25 @@ on: tags: ["v[0-9]+.[0-9]+.[0-9]*"] jobs: + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with pytest + run: | + pip install pytest pytest-cov + pytest -vv + build: - runs-on: ubuntu-latest - # outputs: - # new_tag: ${{ steps.setversion.outputs.new_tag }} + runs-on: ubuntu-latest defaults: run: working-directory: '.' diff --git a/src/utils/nest_functions.py b/src/utils/nest_functions.py index 9003a97..343b5a5 100644 --- a/src/utils/nest_functions.py +++ b/src/utils/nest_functions.py @@ -19,7 +19,7 @@ async def nested_set(dic, keys, value, matchConditions=None): break i += 1 dic[keys[-1]] = value - + async def add_keys_nested_dict(d, keys, defaultValue = None): # Creates a nested value if key does not exist