Adjusting actions
This commit is contained in:
2
.github/workflows/quality-gate.yml
vendored
2
.github/workflows/quality-gate.yml
vendored
@@ -63,7 +63,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r ${{ steps.prepare-requirements.outputs.PROCESSED_REQUIREMENTS_FILE }}
|
pip install -r ${{ steps.prepare-requirements.outputs.PROCESSED_REQUIREMENTS_FILE }}
|
||||||
pip install pytest pytest-cov
|
pip install pytest pytest-cov pytest-asyncio
|
||||||
|
|
||||||
- name: ⬇️ Setup Node.js 18
|
- name: ⬇️ Setup Node.js 18
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Faker(BaseActivity):
|
|||||||
"""
|
"""
|
||||||
topic = input_data.get('topic')
|
topic = input_data.get('topic')
|
||||||
num_messages = input_data.get(
|
num_messages = input_data.get(
|
||||||
'num_messages', random.randint(1, len(self.tags)))
|
'num_messages', random.randint(1, len(self.tags))) # NOSONAR
|
||||||
|
|
||||||
if not topic:
|
if not topic:
|
||||||
raise ValueError("Topic must be specified in input_data")
|
raise ValueError("Topic must be specified in input_data")
|
||||||
@@ -54,11 +54,11 @@ class Faker(BaseActivity):
|
|||||||
|
|
||||||
for _ in range(num_messages):
|
for _ in range(num_messages):
|
||||||
# Select random tag and name
|
# Select random tag and name
|
||||||
tag = random.choice(list(self.tags.keys()))
|
tag = random.choice(list(self.tags.keys())) # NOSONAR
|
||||||
name = self.tags[tag]
|
name = self.tags[tag]
|
||||||
|
|
||||||
# Generate random value between 0 and 100
|
# Generate random value between 0 and 100
|
||||||
if random.random() < 0.1:
|
if random.random() < 0.1: # NOSONAR
|
||||||
value = None
|
value = None
|
||||||
else:
|
else:
|
||||||
value = round(random.uniform(0, 100), 2)
|
value = round(random.uniform(0, 100), 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user