From 23214f72d5914c0387bdbeb0154b019f9e80d540 Mon Sep 17 00:00:00 2001 From: Clare Liguori Date: Tue, 4 Feb 2020 15:45:38 -0800 Subject: [PATCH] feat: Add integ test script --- run_integ_test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 run_integ_test.sh diff --git a/run_integ_test.sh b/run_integ_test.sh new file mode 100755 index 0000000..8e9c733 --- /dev/null +++ b/run_integ_test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -ex + +# Update the integ test action workflow file with the commit ID to test +sed -i "s|aws-actions/configure-aws-credentials@v1|aws-actions/configure-aws-credentials@$GIT_COMMIT_ID|g" test-workflow.yml +mkdir -p .github/workflows +cp test-workflow.yml .github/workflows +git add .github/workflows +git commit -m "Test commit $GIT_COMMIT_ID" + +# Trigger the action workflow +git push origin integ-tests + +# Validate that the action workflow succeeds +# Exit codes: success = 0; failure = 1; pending = 2; no status = 3 +while hub ci-status; [ $? -ge 2 ]; do + echo "waiting for test workflow to complete..." + sleep 5 +done + +hub ci-status