mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Add stylua format check to CI
This commit is contained in:
parent
2b222d8e2a
commit
8ddafdf996
2 changed files with 15 additions and 1 deletions
5
.github/workflows/ci.yaml
vendored
5
.github/workflows/ci.yaml
vendored
|
@ -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"]
|
||||||
|
|
11
.justfile
11
.justfile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue