Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Implement TestEZ CLI (#61)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
LPGhatguy authored Mar 4, 2020
1 parent 725d340 commit 6b356bd
Show file tree
Hide file tree
Showing 26 changed files with 1,960 additions and 34 deletions.
70 changes: 64 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
name: CI

on: [push]
on:
pull_request:
push:
branches:
- master

jobs:
build:
lib:
name: TestEZ Library Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
submodules: true

- uses: leafo/gh-actions-lua@v5
with:
luaVersion: "5.1"

- uses: leafo/gh-actions-luarocks@v2

- name: Install dependencies
run: |
luarocks install luafilesystem
luarocks install luacov
luarocks install luacov-coveralls --server=http://rocks.moonscript.org/dev
luarocks install luacheck
- name: Test
run: |
lua -lluacov spec.lua
luacheck src tests
# luacov-coveralls default settings do not function on GitHub Actions.
# We need to pass different service name and repo token explicitly
- name: Report to Coveralls
run: luacov-coveralls --repo-token $REPO_TOKEN --service-name github
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cli:
name: TestEZ CLI Tests
runs-on: ubuntu-latest

strategy:
Expand All @@ -13,10 +51,30 @@ jobs:

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Setup Rust toolchain
run: rustup default ${{ matrix.rust_version }}

- uses: rojo-rbx/setup-foreman
- uses: rojo-rbx/setup-foreman@v1
with:
version: "^0.5.0"
version: "^0.6.0"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: foreman install
- name: Report tool versions
run: rojo --version

- name: Build
run: cargo build --locked --verbose
env:
RUST_BACKTRACE: 1

- name: Run tests
run: cargo test --locked --verbose

- name: Rustfmt and Clippy
run: |
cargo fmt -- --check
cargo clippy
if: matrix.rust_version == 'stable'
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
push:
tags: ["*"]

jobs:
windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Build release binary
run: cargo build --verbose --locked --release

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: testez-cli-win64
path: target/release/testez-cli.exe

macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

- name: Build release binary
run: |
source $HOME/.cargo/env
cargo build --verbose --locked --release
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: testez-cli-macos
path: target/release/testez-cli

linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Build
run: cargo build --locked --verbose --release

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: testez-cli-linux
path: target/release/testez-cli
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/luacov.*
/site
/lua_install
/lua_install

# Cargo build output
/target
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 6b356bd

Please sign in to comment.