Skip to content

Commit

Permalink
CI Workflow Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiran Jojare committed Jul 19, 2024
1 parent a6d7ad1 commit 15505e3
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Workflow
name: CI

on:
push:
Expand All @@ -11,34 +11,40 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12.2'
python-version: 3.12.2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
python -m unittest discover test
- name: Check code quality with flake8
- name: Lint with flake8
run: |
pip install flake8
flake8 src test
flake8 src test --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 src test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Static code analysis with pylint
- name: Run tests
run: |
pip install pylint
pylint src test
pip install coverage
coverage run -m unittest discover test
coverage report
coverage xml
- name: Run security checks
run: |
pip install bandit
bandit -r src test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true

- name: Codacy code quality
uses: codacy/codacy-analysis-cli-action@v3
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}

0 comments on commit 15505e3

Please sign in to comment.