Skip to content

Updated README.md

Updated README.md #9

Workflow file for this run

name: Code Analysis and Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Ruff
run: |
pip install ruff
- name: Run Ruff
run: |
ruff check . --fix --unsafe-fixes
pylint:
needs: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Pylint
run: |
pip install pylint
- name: Code Review Scoring
run: |
find . -name '*.py' -not -path './.venv/*' -print -exec pylint {} \;
- name: Analysing the code with Pylint
run: |
pylint $(find . -name '*.py' -not -path './.venv/*') --fail-under=8.0
codecov:
needs: pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests and Generate Coverage Report
run: |
pip install coverage pytest-cov
coverage run -m pytest
coverage report
coverage xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
failCiOnError: true