Skip to content

[BUGFIX] [Docker] running pyright (at lint / static check time) fails… #139

[BUGFIX] [Docker] running pyright (at lint / static check time) fails…

[BUGFIX] [Docker] running pyright (at lint / static check time) fails… #139

name: Python CI Coverage
on:
push:
branches: [ "main", "develop", "feature/*" ]
pull_request:
branches: [ "main" ]
env:
LOG_LEVEL: INFO
jobs:
build:
name: "Run CI"
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python: ['3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python }}
- name: Install
run: |
pip3 install -r requirements.txt
- name: Test an coverage collect
run: |
python3 -m coverage run -m pytest --verbose -o log_cli=true --log-cli-level=INFO src/
- name: Coverage Report
run: |
python3 -m coverage report
- name: Coverage lcov
run: |
python3 -m coverage lcov -o coverage/lcov.info
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
- name: Coverage XML
run: |
python3 -m coverage xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}