Skip to content

Apply random value to service name to handle the same agent declared multiple times. #2071

Apply random value to service name to handle the same agent declared multiple times.

Apply random value to service name to handle the same agent declared multiple times. #2071

# This workflow use pylint:
# - Install Python dependencies.
# - Run pylint for each of the supported Python versions.
# Pylint will only fail without fixing any of the errors or warnings.
name: Pylint & Mypy
on:
push:
branches: [ main ]
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install pylint pylint-quotes
python -m pip install mypy types-psutil types-click types-protobuf types-redis types-requests types-urllib3 typing_extensions
python -m pip install -e .
- name: Running Black.
uses: psf/black@stable
with:
options: --check --exclude 'src[\\w\/].+_pb2.py'
- name: Running linter.
run: |
pylint --rcfile=.pylintrc src/
pylint --rcfile=.pylintrc -d C0103,W0613 tests/
- name: Running static types checker.
run: |
mypy src/ostorlab/agent/schema
mypy src/ostorlab/agent/kb
mypy src/ostorlab/agent/message
mypy src/ostorlab/utils
mypy src/ostorlab/apis/runners
mypy src/ostorlab/agent/mixins/agent_report_vulnerability_mixin.py
mypy src/ostorlab/assets