Skip to content

Commit d40f51a

Browse files
LPGhatguyMagiMaster
authored andcommitted
Implement TestEZ CLI (Roblox#61)
* Initial implementation of testez-cli - Supports roblox-cli and Lemur targets - Automatically detects Rotriever and Git submodules dependencies * Back out bad merge? * Switch to Rojo stable * Update GitHub workflows and remove Travis config
1 parent bd620d3 commit d40f51a

26 files changed

+1960
-34
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
48

59
jobs:
6-
build:
10+
lib:
11+
name: TestEZ Library Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
submodules: true
18+
19+
- uses: leafo/gh-actions-lua@v5
20+
with:
21+
luaVersion: "5.1"
22+
23+
- uses: leafo/gh-actions-luarocks@v2
24+
25+
- name: Install dependencies
26+
run: |
27+
luarocks install luafilesystem
28+
luarocks install luacov
29+
luarocks install luacov-coveralls --server=http://rocks.moonscript.org/dev
30+
luarocks install luacheck
31+
32+
- name: Test
33+
run: |
34+
lua -lluacov spec.lua
35+
luacheck src tests
36+
37+
# luacov-coveralls default settings do not function on GitHub Actions.
38+
# We need to pass different service name and repo token explicitly
39+
- name: Report to Coveralls
40+
run: luacov-coveralls --repo-token $REPO_TOKEN --service-name github
41+
env:
42+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
743

44+
cli:
45+
name: TestEZ CLI Tests
846
runs-on: ubuntu-latest
947

1048
strategy:
@@ -13,10 +51,30 @@ jobs:
1351

1452
steps:
1553
- uses: actions/checkout@v1
54+
with:
55+
submodules: true
56+
57+
- name: Setup Rust toolchain
58+
run: rustup default ${{ matrix.rust_version }}
1659

17-
- uses: rojo-rbx/setup-foreman
60+
- uses: rojo-rbx/setup-foreman@v1
1861
with:
19-
version: "^0.5.0"
62+
version: "^0.6.0"
63+
token: ${{ secrets.GITHUB_TOKEN }}
2064

21-
- name: Install dependencies
22-
run: foreman install
65+
- name: Report tool versions
66+
run: rojo --version
67+
68+
- name: Build
69+
run: cargo build --locked --verbose
70+
env:
71+
RUST_BACKTRACE: 1
72+
73+
- name: Run tests
74+
run: cargo test --locked --verbose
75+
76+
- name: Rustfmt and Clippy
77+
run: |
78+
cargo fmt -- --check
79+
cargo clippy
80+
if: matrix.rust_version == 'stable'

.github/workflows/release.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
7+
jobs:
8+
windows:
9+
runs-on: windows-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
with:
14+
submodules: true
15+
16+
- name: Build release binary
17+
run: cargo build --verbose --locked --release
18+
19+
- name: Upload artifacts
20+
uses: actions/upload-artifact@v1
21+
with:
22+
name: testez-cli-win64
23+
path: target/release/testez-cli.exe
24+
25+
macos:
26+
runs-on: macos-latest
27+
28+
steps:
29+
- uses: actions/checkout@v1
30+
with:
31+
submodules: true
32+
33+
- name: Install Rust
34+
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
35+
36+
- name: Build release binary
37+
run: |
38+
source $HOME/.cargo/env
39+
cargo build --verbose --locked --release
40+
41+
- name: Upload artifacts
42+
uses: actions/upload-artifact@v1
43+
with:
44+
name: testez-cli-macos
45+
path: target/release/testez-cli
46+
47+
linux:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- uses: actions/checkout@v1
52+
with:
53+
submodules: true
54+
55+
- name: Build
56+
run: cargo build --locked --verbose --release
57+
58+
- name: Upload artifacts
59+
uses: actions/upload-artifact@v1
60+
with:
61+
name: testez-cli-linux
62+
path: target/release/testez-cli

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/luacov.*
22
/site
3-
/lua_install
3+
/lua_install
4+
5+
# Cargo build output
6+
/target

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)