update auto format code workflow #308
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check & fix styling | |
on: | |
push: | |
jobs: | |
format-code: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Run Prettier | |
run: bunx prettier --config prettier.config.js *.json ./src/* ./tests/* | |
- name: Run ESLint | |
run: bunx eslint --config eslint.config.js --fix --ext ts,js ./src/**/* ./tests/**/* | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Fix styling |