feat(UnitTests): fix unit tests for latest EE changes (Client Timeout) #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed under the MIT License. | |
# For details on the licensing terms, see the LICENSE file. | |
# SPDX-License-Identifier: MIT | |
# Copyright 2023-2024 (c) Fraunhofer IOSB (Author: Florian Düwel) | |
name: Measure code coverage | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
code-coverage: | |
name: Code Coverage | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Check image DeviceRegistry | |
id: image_exists_service_server | |
uses: cloudposse/github-action-docker-image-exists@main | |
with: | |
registry: ghcr.io | |
organization: "swap-it" | |
repository: "demo-scenario/demo-scenario" | |
tag: execution_engine_tutorials | |
- name: Check image service server | |
id: image_exists_device_registry | |
uses: cloudposse/github-action-docker-image-exists@main | |
with: | |
registry: ghcr.io | |
organization: "swap-it" | |
repository: "demo-scenario/device_registry" | |
tag: execution_engine_tutorials | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | |
with: | |
python-version: '3.10.14' | |
- name: Install dependencies | |
run: | | |
sudo apt -qq update | |
pip3 install -r requirements.txt | |
- name: Run Coverage.py | |
run: | | |
coverage run --omit=tests/*,__init__.py tests/unit_tests/run_unit_tests.py | |
coverage report | |
coverage json | |
coverage html | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 |