From d86dc4bbb3355211d5ac18f7435c32d2973bef4a Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sun, 28 Feb 2021 22:20:23 +1300 Subject: [PATCH] ci(package-pr): check OK is included in STDOUT --- .github/workflows/package-pr.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package-pr.yaml b/.github/workflows/package-pr.yaml index daf23e8..d5c317b 100644 --- a/.github/workflows/package-pr.yaml +++ b/.github/workflows/package-pr.yaml @@ -65,7 +65,8 @@ jobs: echo Testing ${PKG_SLUG} (using ${PKG_SLUG}.tf) TEST_FILE=$(cat ${PKG_SLUG}.tf) TEST_JSON=`jq -C '.language = "${PKG_NAME}" | .version = "${PKG_VERSION}" | .files=[] | .files[0]={} | .files[0].name="test" | .files[0].name.content="${TEST_FILE}" | .main = "test" | .args = [] | .stdin = "" | .compile_timeout = 10000 | .run_timeout = 3000' <<< '{}'` - curl -sXPOST http://127.0.0.1:6969/jobs -H 'Content-Type: application/json' -d "$TEST_JSON" + curl -sXPOST http://127.0.0.1:6969/jobs -H 'Content-Type: application/json' -d "$TEST_JSON" > ${PKG_SLUG}.tr + jq '.run.stdout' ${PKG_SLUG}.tr | grep "OK" || exit 1 done