ci(package-pr): check OK is included in STDOUT

This commit is contained in:
Thomas Hobson 2021-02-28 22:20:23 +13:00
parent d295861a7d
commit d86dc4bbb3
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ jobs:
echo Testing ${PKG_SLUG} (using ${PKG_SLUG}.tf) echo Testing ${PKG_SLUG} (using ${PKG_SLUG}.tf)
TEST_FILE=$(cat ${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' <<< '{}'` 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 done