diff --git a/.github/workflows/build-applications.yaml b/.github/workflows/build-applications.yaml index c49ed7c..463bc1e 100644 --- a/.github/workflows/build-applications.yaml +++ b/.github/workflows/build-applications.yaml @@ -460,14 +460,23 @@ jobs: "https://api.github.com/repos/${REPO}/actions/runs/${PREVIOUS_RUN_ID}/jobs" \ | jq -r --arg JOB_NAME "$JOB_NAME" '.jobs[] | select(.name == $JOB_NAME) | .conclusion') - echo "previous_status=${PREVIOUS_STATUS}" >> $GITHUB_OUTPUT + echo "previous_status=${PREVIOUS_STATUS}" + + if [[ -z "$PREVIOUS_STATUS" ]]; then + echo "notify_step=false" >> $GITHUB_ENV + exit 0 + fi + + if [[ "$PREVIOUS_STATUS" == "failure" && "$APP_STATUS" == "success" ]]; then + echo "notify_step=true" >> $GITHUB_ENV + elif [[ "$PREVIOUS_STATUS" == "success" && "$APP_STATUS" == "failure" ]]; then + echo "notify_step=true" >> $GITHUB_ENV + else + echo "notify_step=false" >> $GITHUB_ENV + fi + - name: Notify Slack - if: | - inputs.sendNotifications == true && - ( - (env.app_status == 'true' && steps.previous-run.outputs.previous_status == 'failure') || - (env.app_status != 'true' && steps.previous-run.outputs.previous_status == 'success') - ) + if: ${{ inputs.sendNotifications == 'true' && env.notify_step == 'true' }} uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # v2.3.2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/apps/cosmos-sdk-v2/ci/test.sh b/apps/cosmos-sdk-v2/ci/test.sh index b2b8e1c..3f698b4 100755 --- a/apps/cosmos-sdk-v2/ci/test.sh +++ b/apps/cosmos-sdk-v2/ci/test.sh @@ -5,12 +5,18 @@ set -x BINARY_PATH=$(find $(go env GOPATH)/bin | grep $BINARY_NAME | tail -n 1) +# Rename the binary as makefile is not consistent +mv "${BINARY_PATH}" "${BINARY_PATH}v2" + # Set the timeout to 60 seconds TIMEOUT=60 START_TIME=$(date +%s) cd ${MATRIX_APP_REPOSITORY} make init-simapp-v2 + +# Rename the binary as makefile is not consistent +mv "${BINARY_PATH}v2" "${BINARY_PATH}" ${BINARY_PATH} start > ./output.log 2>1 & APP_PID=$!