diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4e0f08c..476384e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,6 +17,9 @@ jobs: with: components: rustfmt, clippy + - name: Install project tools + uses: ok-nick/setup-aftman@v0.3.0 + - name: Rustfmt run: cargo fmt -- --check @@ -27,10 +30,7 @@ jobs: run: cargo clippy - name: Test - Lune - run: cargo test --package lune - - - name: Test - Lune Roblox - run: cargo test --package lune-roblox + run: just test - name: Test - CLI - run: cargo test --package lune-cli + run: just test-cli diff --git a/.justfile b/.justfile new file mode 100644 index 0000000..6111fac --- /dev/null +++ b/.justfile @@ -0,0 +1,7 @@ +# Run tests for the Lune library +test: + cargo test --package lune -- --test-threads 1 + +# Run tests for the Lune CLI +test-cli: + cargo test --package lune-cli diff --git a/aftman.toml b/aftman.toml index 4644129..ffc23c0 100644 --- a/aftman.toml +++ b/aftman.toml @@ -1,4 +1,5 @@ [tools] +just = "readysetplay/just@1.8.0" luau-lsp = "JohnnyMorganz/luau-lsp@1.15.0" selene = "Kampfkarren/selene@0.24.0" stylua = "JohnnyMorganz/StyLua@0.16.0" diff --git a/packages/lib-roblox/src/instance/mod.rs b/packages/lib-roblox/src/instance/mod.rs index aa1e993..d62dfbf 100644 --- a/packages/lib-roblox/src/instance/mod.rs +++ b/packages/lib-roblox/src/instance/mod.rs @@ -228,7 +228,7 @@ impl Instance { // keep track of all current instance reference structs let dom = INTERNAL_DOM .try_read() - .expect("Failed to get write access to document"); + .expect("Failed to get read access to document"); dom.get_by_ref(self.dom_ref).is_none() } diff --git a/packages/lib/src/tests.rs b/packages/lib/src/tests.rs index c6f3c64..1a5da82 100644 --- a/packages/lib/src/tests.rs +++ b/packages/lib/src/tests.rs @@ -93,27 +93,33 @@ create_tests! { #[cfg(feature = "roblox")] create_tests! { - roblox_axes: "roblox/datatypes/Axes", - roblox_brick_color: "roblox/datatypes/BrickColor", - roblox_cframe: "roblox/datatypes/CFrame", - roblox_color3: "roblox/datatypes/Color3", - roblox_color_sequence: "roblox/datatypes/ColorSequence", - roblox_color_sequence_keypoint: "roblox/datatypes/ColorSequenceKeypoint", - roblox_enum: "roblox/datatypes/Enum", - roblox_faces: "roblox/datatypes/Faces", - roblox_font: "roblox/datatypes/Font", - roblox_number_range: "roblox/datatypes/NumberRange", - roblox_number_sequence: "roblox/datatypes/NumberSequence", - roblox_number_sequence_keypoint: "roblox/datatypes/NumberSequenceKeypoint", - roblox_physical_properties: "roblox/datatypes/PhysicalProperties", - roblox_ray: "roblox/datatypes/Ray", - roblox_rect: "roblox/datatypes/Rect", - roblox_udim: "roblox/datatypes/UDim", - roblox_udim2: "roblox/datatypes/UDim2", - roblox_region3: "roblox/datatypes/Region3", - roblox_region3int16: "roblox/datatypes/Region3int16", - roblox_vector2: "roblox/datatypes/Vector2", - roblox_vector2int16: "roblox/datatypes/Vector2int16", - roblox_vector3: "roblox/datatypes/Vector3", - roblox_vector3int16: "roblox/datatypes/Vector3int16", + roblox_datatype_axes: "roblox/datatypes/Axes", + roblox_datatype_brick_color: "roblox/datatypes/BrickColor", + roblox_datatype_cframe: "roblox/datatypes/CFrame", + roblox_datatype_color3: "roblox/datatypes/Color3", + roblox_datatype_color_sequence: "roblox/datatypes/ColorSequence", + roblox_datatype_color_sequence_keypoint: "roblox/datatypes/ColorSequenceKeypoint", + roblox_datatype_enum: "roblox/datatypes/Enum", + roblox_datatype_faces: "roblox/datatypes/Faces", + roblox_datatype_font: "roblox/datatypes/Font", + roblox_datatype_number_range: "roblox/datatypes/NumberRange", + roblox_datatype_number_sequence: "roblox/datatypes/NumberSequence", + roblox_datatype_number_sequence_keypoint: "roblox/datatypes/NumberSequenceKeypoint", + roblox_datatype_physical_properties: "roblox/datatypes/PhysicalProperties", + roblox_datatype_ray: "roblox/datatypes/Ray", + roblox_datatype_rect: "roblox/datatypes/Rect", + roblox_datatype_udim: "roblox/datatypes/UDim", + roblox_datatype_udim2: "roblox/datatypes/UDim2", + roblox_datatype_region3: "roblox/datatypes/Region3", + roblox_datatype_region3int16: "roblox/datatypes/Region3int16", + roblox_datatype_vector2: "roblox/datatypes/Vector2", + roblox_datatype_vector2int16: "roblox/datatypes/Vector2int16", + roblox_datatype_vector3: "roblox/datatypes/Vector3", + roblox_datatype_vector3int16: "roblox/datatypes/Vector3int16", + roblox_files_read_model: "roblox/files/readModelFile", + roblox_files_read_place: "roblox/files/readPlaceFile", + roblox_files_write_model: "roblox/files/writeModelFile", + roblox_files_write_place: "roblox/files/writePlaceFile", + roblox_instance_new: "roblox/instance/new", + roblox_instance_properties: "roblox/instance/properties", }