Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/actions/lint/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: lint

inputs:
GITHUB_TOKEN:
required: true

runs:
using: "composite"
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install aftman
uses: ok-nick/setup-aftman@v0.4.2
with:
token: ${{ inputs.GITHUB_TOKEN }}

- name: Lint
run: selene ./src
shell: bash
18 changes: 18 additions & 0 deletions .github/actions/style/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: style

inputs:
GITHUB_TOKEN:
required: true

runs:
using: "composite"
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: StyLua
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ inputs.GITHUB_TOKEN }}
version: 0.20.0
args: --check ./src
32 changes: 32 additions & 0 deletions .github/actions/tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: tests

inputs:
GITHUB_TOKEN:
required: true
ROBLOX_TEST_API_KEY:
required: true

runs:
using: "composite"
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install aftman
uses: ok-nick/setup-aftman@v0.4.2
with:
token: ${{ inputs.GITHUB_TOKEN }}

- name: Install wally packages
run: wally install
shell: bash

- name: Build test place
run: rojo build -o test.rbxl test/default.project.json
shell: bash

- name: Run tests task
run: lune run cloud/execute_task.luau test.rbxl test/run.lua
shell: bash
env:
ROBLOX_API_KEY: ${{ inputs.ROBLOX_TEST_API_KEY }}
26 changes: 26 additions & 0 deletions .github/actions/wally-publish/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: wally-publish

inputs:
GITHUB_TOKEN:
required: true
WALLY_TOKEN:
required: true

runs:
using: "composite"
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install aftman
uses: ok-nick/setup-aftman@v0.4.2
with:
token: ${{ inputs.GITHUB_TOKEN }}

- name: Wally login
run: wally login --token ${{ inputs.WALLY_TOKEN }}
shell: bash

- name: Publish
run: wally publish
shell: bash
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
paths:
- "src/**"
push:
branches:
- main
paths:
- "src/**"
workflow_dispatch:

jobs:
style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Styling
uses: ./.github/actions/style
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Linting
uses: ./.github/actions/lint
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

- name: Tests
uses: ./.github/actions/tests
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ROBLOX_TEST_API_KEY: ${{ secrets.ROBLOX_TEST_API_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish

on:
release:
types:
- published

jobs:
wally-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Wally publish
uses: ./.github/actions/wally-publish
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WALLY_TOKEN: ${{ secrets.WALLY_TOKEN }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Project place file
/*.rbxl
/*.rbxlx
/*.rbxm
/*.rbxmx

# Roblox Studio lock files
/*.rbxlx.lock
/*.rbxl.lock

# sourcemap
/sourcemap.json

/Packages/*
/DevPackages/*
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"[lua]": {
"editor.defaultFormatter": "JohnnyMorganz.stylua",
"editor.formatOnSave": true
},
"[luau]": {
"editor.defaultFormatter": "JohnnyMorganz.stylua",
"editor.formatOnSave": true
},
"stylua.targetReleaseVersion": "latest",
"luau-lsp.ignoreGlobs": [
"DevPackages/**",
"test/**",
"cloud/**"
],
}
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run tests",
"type": "shell",
"command": "rojo build ./test/default.project.json -o tests.rbxl; run-in-roblox --place ./tests.rbxl --script ./test/run.lua",
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": false
}
},
{
"label": "Build Validator.rbxm",
"type": "shell",
"command": "rojo build default.project.json -o Validator.rbxm",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": false
}
},
]
}
7 changes: 7 additions & 0 deletions aftman.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tools]
rojo = "rojo-rbx/rojo@7.5.1"
selene = "Kampfkarren/selene@0.29.0"
stylua = "JohnnyMorganz/StyLua@0.20.0"
rbxcloud = "Sleitnick/rbxcloud@0.14.0"
wally = "upliftgames/wally@0.3.2"
lune = "lune-org/lune@0.10.3"
Loading