diff --git a/.github/workflows/check-format.yml b/.github/workflows/check-format.yml new file mode 100644 index 0000000..90aa939 --- /dev/null +++ b/.github/workflows/check-format.yml @@ -0,0 +1,39 @@ +name: Check Format + +on: + pull_request: + +jobs: + format-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Install dependencies + run: pnpm install + + - name: Check Prettier formatting + run: | + pnpm exec prettier --check . + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + + - name: Check Rust formatting + run: | + cd src-tauri + cargo fmt --all -- --check