Skip to content

Commit

Permalink
worflow additon
Browse files Browse the repository at this point in the history
  • Loading branch information
rajveer43 committed Sep 7, 2023
1 parent e80470c commit 81972d3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python Formatting Check

on: [push, pull_request]

jobs:
format-check:
name: Check Python Formatting
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install Dependencies
run: |
pip install flake8 black ruff
- name: Check Formatting with Flake8
run: flake8
continue-on-error: true

- name: Check Formatting with Black
run: black --check .
continue-on-error: true

- name: Check Formatting with Ruff
run: ruff check
continue-on-error: true
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')

0 comments on commit 81972d3

Please sign in to comment.