Skip to content

Commit cf9c058

Browse files
committed
install lua and ruby on CI runner for integration tests
Runtimes are installed via apt-get so all plugin tests run properly.
1 parent bf197ad commit cf9c058

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ jobs:
6565

6666
- uses: dtolnay/rust-toolchain@stable
6767

68+
- name: Install test runtimes
69+
run: |
70+
sudo apt-get update
71+
sudo apt-get install -y lua5.4 ruby
72+
6873
- name: Verify tag matches workspace version
6974
run: |
7075
TAG="${GITHUB_REF#refs/tags/v}"

‎crates/lowfat-runner/src/process.rs‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,6 @@ mod tests {
115115
use lowfat_core::level::Level;
116116
use std::io::Write;
117117

118-
fn has_runtime(bin: &str) -> bool {
119-
std::process::Command::new("which")
120-
.arg(bin)
121-
.stdout(std::process::Stdio::null())
122-
.stderr(std::process::Stdio::null())
123-
.status()
124-
.map(|s| s.success())
125-
.unwrap_or(false)
126-
}
127-
128118
fn make_input(raw: &str) -> FilterInput {
129119
FilterInput {
130120
raw: raw.to_string(),
@@ -207,7 +197,6 @@ json.dump({"output": "\n".join(lines)}, sys.stdout)
207197

208198
#[test]
209199
fn ruby_raw_filter() {
210-
if !has_runtime("ruby") { return; }
211200
let code = r#"
212201
$stdin.each_line do |line|
213202
puts line unless line.start_with?("warning:")
@@ -221,7 +210,6 @@ end
221210

222211
#[test]
223212
fn lua_raw_filter() {
224-
if !has_runtime("lua") { return; }
225213
let code = r#"
226214
for line in io.lines() do
227215
if not line:match("^warning:") then

0 commit comments

Comments
 (0)