Skip to content

Merge pull request #21 from OSDG-IIITH/ankith26-motor #18

Merge pull request #21 from OSDG-IIITH/ankith26-motor

Merge pull request #21 from OSDG-IIITH/ankith26-motor #18

Workflow file for this run

name: Auto Linitng and Formatting
on:
push:
branches:
- master
jobs:
linting_formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# JS Formatting
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Prettier
run: |
npm install --global prettier
- name: Format with Prettier
run: prettier --write "**/*.{js,jsx,md,mdx,css,yaml}"
# Python Formatting
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Lint with ruff
run: ruff check --fix bot/*.py
- name: Format with ruff
run: ruff format bot/*.py
- name: Remove ruff cache
run: rm -rf .ruff_cache
# Commit Changes
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply Linting & Formatting Fixes