diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..a68ed5a78 --- /dev/null +++ b/.github/workflows/main.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 000000000..0ad87c34f --- /dev/null +++ b/.github/workflows/pylint.yml @@ -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') \ No newline at end of file