diff --git a/.github/workflows/Formatter.yaml b/.github/workflows/Formatter.yaml new file mode 100644 index 0000000..61aefde --- /dev/null +++ b/.github/workflows/Formatter.yaml @@ -0,0 +1,34 @@ +name: Format code + +on: push + +jobs: + formatter: + name: formatter + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.11.0] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install autoflake black isort + - name: autoflake + run: autoflake -r . + - name: black + run: black . + - name: isort + run: isort . + - name: Auto Commit + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply Code Formatter Change \ No newline at end of file