Skip to content

Commit 9922228

Browse files
committed
Add files for workflows
1 parent c96aacc commit 9922228

15 files changed

+8355
-0
lines changed

.github/workflows/CI.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: install selene
10+
run: |
11+
curl https://github.com/Kampfkarren/selene/releases/download/0.9.1/selene-linux -L -o selene
12+
chmod +x ./selene
13+
- name: run selene
14+
run: ./selene ./src
15+
unit-tests:
16+
runs-on: windows-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: download roblox install script
20+
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/install.py" -OutFile install.py
21+
- name: download settings file
22+
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/GlobalSettings_13.xml" -OutFile GlobalSettings_13.xml
23+
- name: install pip deps
24+
run: pip install wget psutil
25+
- name: install roblox
26+
run: python install.py "${{ secrets.ROBLOSECURITY }}"
27+
- name: install foreman
28+
uses: rojo-rbx/setup-foreman@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
- name: install foreman packages (rojo, run-in-roblox)
32+
run: foreman install
33+
- name: install wally packages
34+
run: wally install
35+
- name: run rojo build
36+
run: rojo build -o .\\unit_tests.rbxlx .\\unit-tests.project.json
37+
- name: run tests
38+
run: run-in-roblox --place .\\unit_tests.rbxlx --script .\\spec.server.lua

.github/workflows/Release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: install python dependencies
11+
run: pip3 install -r requirements.txt
12+
- name: get wally version
13+
id: get_wally_version
14+
run: echo "::set-output name=version-string::$(python3 ./scripts/get_wally_version_string.py)"
15+
- name: install foreman
16+
uses: rojo-rbx/setup-foreman@v1
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
- name: install foreman packages (rojo, run-in-roblox)
20+
run: foreman install
21+
- name: install wally packages
22+
run: wally install
23+
- name: run rojo build
24+
run: rojo build -o ./statistics-${{ steps.get_wally_version.outputs.version-string }}.rbxmx ./standalone-model.project.json
25+
- name: create-release
26+
uses: actions/create-release@latest
27+
id: create_release
28+
with:
29+
draft: false
30+
prerelease: false
31+
release_name: ${{ steps.get_wally_version.outputs.version-string }}
32+
tag_name: ${{ steps.get_wally_version.outputs.version-string }}
33+
body_path: CHANGELOG.md
34+
env:
35+
GITHUB_TOKEN: ${{ github.token }}
36+
- name: upload rbxmx file to release
37+
uses: actions/upload-release-asset@v1
38+
env:
39+
GITHUB_TOKEN: ${{ github.token }}
40+
with:
41+
upload_url: ${{ steps.create_release.outputs.upload_url }}
42+
asset_path: ./statistics-${{ steps.get_wally_version.outputs.version-string }}.rbxmx
43+
asset_name: statistics-${{ steps.get_wally_version.outputs.version-string }}.rbxmx
44+
asset_content_type: form
45+
- name: upload rbxmx file to Roblox
46+
run: |
47+
cd ./scripts
48+
python upload_model.py -a ${{ secrets.ASSET_ID }} -f ../statistics-${{ steps.get_wally_version.outputs.version-string }}.rbxmx -r "${{ secrets.UPLOADER_BOT_ROBLOSECURITY }}"
49+
cd ..
50+
- name: prepare wally package contents
51+
run: |
52+
mkdir -p ~/temp/statistics
53+
cp -r ./{Packages,src} ~/temp/statistics/
54+
cp ./{CHANGELOG.md,LICENSE,README.md,wally.lock,wally.toml} ~/temp/statistics/
55+
cp ./standalone-model.project.json ~/temp/statistics/default.project.json
56+
- name: prepare wally auth
57+
run: |
58+
mkdir ~/.wally
59+
echo -e '${{ secrets.WALLY_AUTH }}' > ~/.wally/auth.toml
60+
- name: publish wally package
61+
run: wally publish --project-path ~/temp/statistics/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Releases!

foreman.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tools]
2+
rojo = { source = "rojo-rbx/rojo", version = "6" }
3+
run-in-roblox = { source = "rojo-rbx/run-in-roblox", version = "0.3.0" }
4+
wally = { source = "UpliftGames/wally", version = "0.2.1" }

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
toml == 0.10.2

roblox-testez.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[selene]
2+
base = "roblox"
3+
name = "roblox-testez"
4+
5+
[describe]
6+
[[describe.args]]
7+
type = "string"
8+
required = true
9+
10+
[[describe.args]]
11+
type = "function"
12+
required = true
13+
14+
[[it.args]]
15+
type = "string"
16+
required = true
17+
18+
[[it.args]]
19+
type = "function"
20+
required = true
21+
22+
[[expect.args]]
23+
type = "any"
24+
required = true

0 commit comments

Comments
 (0)