resolve name conflict #627
This file contains hidden or 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
| name: Static Code Analysis | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - '*' | |
| jobs: | |
| python-linter: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.10" ] | |
| application: [sm-client] | |
| include: | |
| - dir-list: sm_client sm-client | |
| req-file: requirements-sc.txt | |
| application: sm-client | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r ${{ matrix.req-file }} | |
| - name: Install software | |
| run: pip install bandit pylint mypy==1.11.* radon xenon | |
| - name: Security check with bandit | |
| id: bandit_check | |
| run: bandit -r ${{ matrix.dir-list }} | |
| - name: Lint check with pylint | |
| id: pylint_check | |
| if: (success() || failure()) && steps.bandit_check.outcome != 'skipped' | |
| run: pylint --fail-under 7 --fail-on E,F --max-line-length=150 ${{ matrix.dir-list }} | |
| - name: Import check with mypy | |
| id: mypy_check | |
| if: (success() || failure()) && steps.pylint_check.outcome != 'skipped' | |
| run: | | |
| mkdir .mypy_cache | |
| mypy --install-types --non-interactive --explicit-package-bases --implicit-optional --allow-redefinition ${{ matrix.dir-list }} | |
| - name: Cyclic complexity check with radon/xenon | |
| id: radon_check | |
| if: (success() || failure()) && steps.mypy_check.outcome != 'skipped' | |
| # Use `radon cc {pathes} -a` locally for full report per function | |
| # xenon checks, if radon absolute result will be A or B | |
| run: | | |
| radon cc ${{ matrix.dir-list }} -a | |
| xenon -a B ${{ matrix.dir-list }} | |
| golang-linter: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| application: [site-manager, paas-geo-monitor] | |
| include: | |
| - working-directory: site-manager | |
| application: site-manager | |
| - working-directory: paas-geo-monitor | |
| application: paas-geo-monitor | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v4 | |
| with: | |
| version: v1.61 | |
| working-directory: ${{ matrix.working-directory }} | |
| args: --timeout=5m |