-
Notifications
You must be signed in to change notification settings - Fork 10
85 lines (72 loc) · 2.21 KB
/
uns_sparkplugb-app.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: UNS Sparkplug B Decoder MQTT Client
on:
push:
branches:
- "**"
paths:
- "02_mqtt-cluster/**/*.py*"
- "02_mqtt-cluster/pyproject.toml"
- "02_mqtt-cluster/poetry.lock"
- "05_sparkplugb/**/*.py"
- "05_sparkplugb/pyproject.toml"
- "05_sparkplugb/poetry.lock"
- "05_sparkplugb/Dockerfile"
- ".github/workflows/uns_sparkplugb-app.yml"
- ".github/include/**"
pull_request:
branches:
- "**"
paths:
- "02_mqtt-cluster/**/*.py*"
- "02_mqtt-cluster/pyproject.toml"
- "02_mqtt-cluster/poetry.lock"
- "05_sparkplugb/**/*.py"
- "05_sparkplugb/pyproject.toml"
- "05_sparkplugb/poetry.lock"
- "05_sparkplugb/Dockerfile"
- ".github/workflows/uns_sparkplugb-app.yml"
- ".github/include/**"
workflow_dispatch:
inputs:
pytest_add_opts: # trunk-ignore(checkov/CKV_GHA_7) # trunk-ignore(checkov/CKV_GHA_7)
description: "additional pytest options"
type: string
permissions:
contents: read
jobs:
build_code:
runs-on: ubuntu-latest
environment: dev
env:
UNS_mqtt.host: "localhost"
UNS_mqtt.port: 1883
services:
uns_mqtt:
image: "emqx/emqx:latest"
ports:
- "1883:1883"
- "8083:8083"
steps:
- uses: actions/checkout@v4
- name: Setup with python environment
uses: ./.github/include/setup_python/
with:
module: 05_sparkplugb
- name: Run all type of tests
uses: ./.github/include/execute_tests/
with:
module: 05_sparkplugb
integration_tests: true
SAFETY_API_KEY: ${{ secrets.SAFETY_API_KEY }}
pytest_flags: ${{ inputs.pytest_add_opts }}
build_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile and Test Dockerfile
uses: ./.github/include/test_docker_builds/
with:
module: 05_sparkplugb
image_name: uns/spb_mapper