Add stylua format check to CI

This commit is contained in:
Filip Tibell 2023-09-25 14:30:07 -05:00
parent 2b222d8e2a
commit 8ddafdf996
No known key found for this signature in database
2 changed files with 15 additions and 1 deletions

View file

@ -25,8 +25,11 @@ jobs:
with: with:
components: rustfmt components: rustfmt
- name: Install Just
uses: extractions/setup-just@v1
- name: Check Formatting - name: Check Formatting
run: cargo fmt -- --check run: just fmt-check
ci: ci:
needs: ["fmt"] needs: ["fmt"]

View file

@ -9,3 +9,14 @@ run-file FILE_NAME:
# Run tests for the Lune library # Run tests for the Lune library
test: test:
cargo test --lib 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