Skip to content
41 changes: 41 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on: [push]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install local npm packages
run: npm i --production=false
- name: run eslint
run: npm run eslint
unit-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: download roblox install script
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/install.py" -OutFile install.py
- name: download settings file
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/GlobalSettings_13.xml" -OutFile GlobalSettings_13.xml
- name: install pip deps
run: pip install wget psutil
- name: install roblox
run: python install.py "${{ secrets.ROBLOSECURITY }}"
- name: install roblox-ts
run: npm i -g roblox-ts
- name: install local npm packages
run: npm i --production=false
- name: compile typescript code
run: rbxtsc --type=game
- name: install foreman
uses: rojo-rbx/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: install foreman packages (rojo, run-in-roblox)
run: foreman install
- name: run rojo build
run: rojo build -o .\\unit_tests.rbxlx
- name: run tests
run: run-in-roblox --place .\\unit_tests.rbxlx --script .\\spec.server.lua
24 changes: 24 additions & 0 deletions default.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "test-rojo-proj",
"tree": {
"$className": "DataModel",
"ReplicatedStorage": {
"$className": "ReplicatedStorage",
"rbxts_include": {
"$path": "include",
"node_modules": {
"$path": "./node_modules/@rbxts"
}
},
"out": {
"$path": "./out"
}
},
"ServerScriptService": {
"$className": "ServerScriptService",
"TestRunner": {
"$path": "./spec.server.lua"
}
}
}
}
3 changes: 3 additions & 0 deletions foreman.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
rojo = { source = "rojo-rbx/rojo", version = "0.5.3" }
run-in-roblox = { source = "rojo-rbx/run-in-roblox", version = "0.3.0" }
24 changes: 23 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "out/init.lua",
"scripts": {
"build": "rbxtsc",
"eslint": "npx eslint \"src/**/*.ts\" --max-warnings 0",
"watch": "rbxtsc -w",
"prepublishOnly": "npm run build"
},
Expand All @@ -31,6 +32,8 @@
"typescript": "^4.4.4"
},
"dependencies": {
"@rbxts/signals-tooling": "^1.0.4"
"@rbxts/fitumi": "^1.0.9",
"@rbxts/signals-tooling": "^1.0.4",
"@rbxts/testez": "*"
}
}
Loading