Skip to content

Commit 3ba6e77

Browse files
committed
converted actionlint github workflow test to rust test
1 parent 329cdcc commit 3ba6e77

File tree

2 files changed

+13
-2
lines changed
  • .github/workflows
  • test-fuzz/tests/integration

2 files changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ jobs:
129129
cargo install cargo-supply-chain || true
130130
cargo install cargo-unmaintained || true
131131
cargo install group-runner || true
132+
go install github.com/rhysd/actionlint/cmd/actionlint@latest
132133
133134
- name: Free up space
134135
run: |

test-fuzz/tests/integration/ci.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use regex::Regex;
33
use similar_asserts::SimpleDiff;
44
use std::{
55
collections::HashSet,
6-
env::var,
6+
env,
77
ffi::OsStr,
88
fs::{read_to_string, write},
99
path::Path,
@@ -232,7 +232,17 @@ fn unmaintained() {
232232
.success();
233233
}
234234

235+
#[test]
236+
fn actionlint() {
237+
#[allow(deprecated)]
238+
let home = env::home_dir().unwrap();
239+
Command::new(home.join("go/bin/actionlint"))
240+
.env("SHELLCHECK_OPTS", "--exclude=SC2002")
241+
.logged_assert()
242+
.success();
243+
}
244+
235245
#[must_use]
236246
pub fn enabled(key: &str) -> bool {
237-
var(key).is_ok_and(|value| value != "0")
247+
env::var(key).is_ok_and(|value| value != "0")
238248
}

0 commit comments

Comments
 (0)