Skip to content

Commit

Permalink
New Testing Feature (#211)
Browse files Browse the repository at this point in the history
* New tests

* Progress

* Build command

* Test

* Python dependencies

* Protocol

* Key

* JSON

* Wait for status

* Build tests

* Output results

* Restructure

* Check actual output status

* Output text

* More tests

* Script refactor

* Key fix

* Pass condition

* Status

* Cleanup

* Trove test

* Fixes

* Fixes

* Fixes

* Timer tests

* Fix tester

* Table tests

* Table test

* Symbol test

* Silo test

* BeforeEach and AfterEach fix

* Signal test

* Shake test

* Ser test

* Option test

* Adjust test

* Enum list test

* Concur test

* Component test

* Component

* WaitFor test
  • Loading branch information
Sleitnick authored Dec 10, 2024
1 parent efd9787 commit ca9ffa0
Show file tree
Hide file tree
Showing 44 changed files with 2,836 additions and 2,406 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,51 @@ jobs:
name: Styling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.20.0
version: v2.0.2
args: --check ./modules

tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Aftman
uses: ok-nick/[email protected]

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install Python dependencies
run: pip install -r requirements.txt

- name: Run test builder
run: python build_tests.py

- name: Build place file
run: rojo build -o test.rbxl test.project.json

- name: Upload place file
shell: bash
env:
UID: 6900069600
PID: 110224315334647
API_KEY: ${{ secrets.RBXCLOUD_API_KEY }}
FILE: test.rbxl
run: rbxcloud experience publish -a "$API_KEY" -u "$UID" -p "$PID" -t published -f "$FILE"

- name: Run tests
env:
UID: 6900069600
PID: 110224315334647
API_KEY: ${{ secrets.RBXCLOUD_API_KEY }}
FILE: test.rbxl
run: python -u run_tests.py "$UID" "$PID"
9 changes: 0 additions & 9 deletions TEST.md

This file was deleted.

2 changes: 1 addition & 1 deletion aftman.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tools = { rojo = "rojo-rbx/[email protected].0" , run-in-roblox = "rojo-rbx/[email protected]" , wally = "UpliftGames/[email protected]" , selene = "Kampfkarren/[email protected]" , stylua = "JohnnyMorganz/StyLua@0.20.0" }
tools = { rojo = "rojo-rbx/[email protected].4" , run-in-roblox = "rojo-rbx/[email protected]" , wally = "UpliftGames/[email protected]" , selene = "Kampfkarren/[email protected]" , stylua = "JohnnyMorganz/StyLua@2.0.2", rbxcloud = "Sleitnick/[email protected].0" }
2 changes: 1 addition & 1 deletion build_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def update_test_file(test_path, original_src_path):

class WatchHandler(PatternMatchingEventHandler):
def __init__(self):
PatternMatchingEventHandler.__init__(self, patterns=["*.lua"], ignore_directories=True, case_sensitive=False)
PatternMatchingEventHandler.__init__(self, patterns=["*.luau"], ignore_directories=True, case_sensitive=False)
def on_modified(self, event):
original_src_path = event.src_path
if original_src_path in files_locked:
Expand Down
7 changes: 7 additions & 0 deletions ci/RunTests.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")

local Test = require(ServerScriptService.TestRunner.Test)

-- Run tests
return Test.run({ ReplicatedStorage.Modules })
Loading

0 comments on commit ca9ffa0

Please sign in to comment.