diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bfe2683..98d95ea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,8 +25,11 @@ jobs: with: components: rustfmt + - name: Install Just + uses: extractions/setup-just@v1 + - name: Check Formatting - run: cargo fmt -- --check + run: just fmt-check ci: needs: ["fmt"] diff --git a/.justfile b/.justfile index 33d8a26..0db0e59 100644 --- a/.justfile +++ b/.justfile @@ -9,3 +9,14 @@ run-file FILE_NAME: # Run tests for the Lune library test: cargo test --lib + +# Check formatting for all Rust & Luau files +fmt-check: + #!/usr/bin/env bash + set -euo pipefail + stylua scripts --check + stylua types --check + stylua tests --check \ + --glob "tests/**/*.luau" \ + --glob "!tests/roblox/rbx-test-files/**" + cargo fmt --check