-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (54 loc) · 1.99 KB
/
code_coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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